0

I am working with my personal Facebook data, which is in JSON files with Latin-1 encoding. I would like to change the encoding to UTF-8, so I wont experience issues with scandinavian letters such as æ, ø and å.

I have looked into several questions, including this one, but I still haven't solved my problem: Facebook JSON badly encoded

Could anyone give some advice on how I change the encoding on a JSON file in an early stage?

Current code:

import json
with open('path.json', encoding='latin-1') as file:
    data = json.load(file)
2
  • Please show a sample of the JSON you are talking about, and explain what it is that you hope that "changing the encoding" would do.
    – Tomalak
    Dec 15, 2018 at 12:29
  • Also, the answer you link to is pretty comprehensive. What about it did not work in your case?
    – Tomalak
    Dec 15, 2018 at 12:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.