I am using Python urllib.request library to read data from API.
response = compatible_urllib.urlopen(request).read()
For one of responses from API I am getting following string as a value of response variable:
"title":"Istina o slu\u010daju Harryja Queberta"
Instead of \u010d, Croatian character č should be displayed but I can't get it. I tried many solutions found on Stack Overflow but didn't find solution. This is what I tried so far:
#res = response.decode("utf-8")
#res = response.decode("utf-8").replace("\\", "")
#res = response.decode("cp1250").replace("\\", "")
#res = response.encode().decode("unicode-escape") # ascii codec can't encode character \u0160
#res = response.encode("utf-8")
#res = response.encode('utf-8', 'ignore').decode('utf-8')
What could be a solution for this? (string is written to database as \u010d, so it is not just terminal display issue)