python 3 coding issue

Viewed 22

I create a JSON file with VSC (or Notepad++). This contains an array of strings. One of the strings is "GRÜN". Then I read the file with Python 3.

with codecs.open(file,'r',"iso-8859-15") as infile:
   dictionarry = json.load(infile)

If I print the array (inside in "dictionary") to the console, I see: "GRÃ\x9cN" How can I convert "GRÃ\x9cN" to "GRÜN" again?

I try to read the JSON file with codec "iso-8859-1" too, but the issue still occurred.

0 Answers
Related