Skip to main content
added 58 characters in body
Source Link
Nerzid
  • 145
  • 4

SOLUTION

import html

html.unescape()

enter image description here

enter image description here

SOLUTION

import html

html.unescape()

enter image description here

Source Link
Nerzid
  • 145
  • 4

Stack API doesn't return json with encoding of UTF-8

Here is the query

RESULT

    {
    "items": [
        {
            "badge_counts": {
                "bronze": 2,
                "silver": 1,
                "gold": 0
            },
            "view_count": 2,
            "down_vote_count": 0,
            "up_vote_count": 12,
            "answer_count": 1,
            "question_count": 0,
            "account_id": 1094354,
            "is_employee": false,
            "last_modified_date": 1447469978,
            "last_access_date": 1468508841,
            "reputation_change_year": 0,
            "reputation_change_quarter": 0,
            "reputation_change_month": 0,
            "reputation_change_week": 0,
            "reputation_change_day": 0,
            "reputation": 36,
            "creation_date": 1323366965,
            "user_type": "registered",
            "user_id": 1088280,
            "about_me": "",
            "website_url": "",
            "link": "https://stackoverflow.com/users/1088280/onurguven",
            "profile_image": "https://www.gravatar.com/avatar/8a9f2e211fc1467000c13e9669d1bfac?s=128&d=identicon&r=PG",
            "display_name": "onurguven"
        },
        {
            "badge_counts": {
                "bronze": 6,
                "silver": 0,
                "gold": 0
            },
            "view_count": 5,
            "down_vote_count": 0,
            "up_vote_count": 4,
            "answer_count": 2,
            "question_count": 1,
            "account_id": 6550820,
            "is_employee": false,
            "last_modified_date": 1500780894,
            "last_access_date": 1503448756,
            "reputation_change_year": 26,
            "reputation_change_quarter": 26,
            "reputation_change_month": 0,
            "reputation_change_week": 0,
            "reputation_change_day": 0,
            "reputation": 27,
            "creation_date": 1435665686,
            "user_type": "registered",
            "user_id": 5065301,
            "about_me": "<p>Hello, I am Onur Osman Güle.</p>\n\n<p>I am 17.</p>\n\n<p>I am from Turkey.</p>\n\n<p>Curious to learn programming languages.</p>\n\n<p>I am going to be a computer engineer.</p>\n",
            "location": "İstanbul, T&#252;rkiye",
            "website_url": "http://onurgule.com.tr",
            "link": "https://stackoverflow.com/users/5065301/onurgule",
            "profile_image": "https://i.sstatic.net/4LmSt.jpg?s=128&g=1",
            "display_name": "Onurgule"
        },
        {
            "badge_counts": {
                "bronze": 2,
                "silver": 0,
                "gold": 0
            },
            "view_count": 2,
            "down_vote_count": 0,
            "up_vote_count": 0,
            "answer_count": 0,
            "question_count": 3,
            "account_id": 3804407,
            "is_employee": false,
            "last_modified_date": 1388752189,
            "last_access_date": 1423972510,
            "reputation_change_year": 0,
            "reputation_change_quarter": 0,
            "reputation_change_month": 0,
            "reputation_change_week": 0,
            "reputation_change_day": 0,
            "reputation": 7,
            "creation_date": 1388752138,
            "user_type": "registered",
            "user_id": 3157211,
            "about_me": "",
            "website_url": "",
            "link": "https://stackoverflow.com/users/3157211/s-onurgul",
            "profile_image": "https://www.gravatar.com/avatar/2cf9ea703b9c69976bfce7ec0aa4e2e1?s=128&d=identicon&r=PG&f=1",
            "display_name": "s.onurgul"
        }
    ],
    "has_more": false,
    "quota_max": 10000,
    "quota_remaining": 9999
}

Location

How it is returned

"location": "İstanbul, T&#252;rkiye"

How it should be returned

"location": "İstanbul, Türkiye"

If you look at the location of user you'll see that the character ü is being shown as &#252;

Whereas, on the profile page, location is shown as how it should be.

enter image description here