locale

I am going through hell trying to compile messages when translating using i18n, as it complains all the time

UnicodeEncodeError: 'latin-1' codec can't encode character '\u201c' in position 5: ordinal not in range(256)

this refers to a left double quote, but it is not in the .po file because even if it is empty it will complain.

I went to the python shell

import locale

locale.getlocale()  

and I get a

('en_US', 'ISO8859-1')

I am using Linux Fedora, English version
 

why in bloody hell is it using the LATIN encoding. there is no way to set it to UTF-8

as in locale.setlocale(LC_all, ‘en_US.UTF-8’)

because even it it looks as if it has changed it, it has not and the compiling errors will continue. Worse than that, without any reproducible pattern some times it will compile the .po files, others will not, but the error is anyway always shown.

I don't know if the locale has anything to do with it, but the standard procedure of simply translating gets blocked because of that unicodeEncodeError

0

请先登录再写评论。