0

I have a csv data that contains names of people from different countries like Croatia, Norway, Serbia, Turkey etc. Their names includes symbols like this 'Ødegaard', 'Cédric', 'Kolašinac'. Upon reading the csv data on python, it converts the names like this '�degaard' or 'Filip ?uri?i?'.

How can i fix this?

  • This question is I believe answered here -> [click](https://stackoverflow.com/questions/1342000/how-to-make-the-python-interpreter-correctly-handle-non-ascii-characters-in-stri) – PoePew Jul 25 '22 at 11:15
  • what have you tried? (https://docs.python.org/3/library/csv.html) – thebjorn Jul 25 '22 at 11:21
  • Try opening the file using e.g. `open(csvfile, 'r', encoding='utf-8')`. If that doesn't work, try some other [standard encodings](https://docs.python.org/3/library/codecs.html#standard-encodings) like "latin1", "cp1256", "utf-8-sig", etc. – ekhumoro Jul 25 '22 at 11:29

0 Answers0