I am reading a file containing Romanian words in Python with file.readline (). I have a problem with many characters due to encoding.
Example:
>>> a = "aberație"
I tried encode () with utf-8, cp500, etc., but it does not work.
I can not find which character encoding should I use?
early.
Edit: the goal is to save the word from the file in dictionnary, and when printing it, to get aberaţie, not 'abera \ xc8 \ x9bie'
python file encoding decoding
lilawood
source share