-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding error when running makemessages #46
Comments
I don't understand the proposed fix. How did you come to this conclusion? |
Oh, I see, the default encoding is platform-dependent. It's probably UTF-16 or something on Windows. |
Yes, i am using it at windows. Probably cp1252... Thank you, django-vinaigrette is being very useful here |
is it gonna be an official patch for this issue ? |
Hi. |
Special chars in my .po file are causing error when i run makemessages:
File "H:\OneDrive\Documents\Workspace\workspace.python\executorbpm\venv\lib\site-packages\vinaigrette\management\commands\makemessages.py", line 171, in handle
for line in po_file:
File "C:\Dev\Python3.7\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 3547: character maps to
It was solved changing
vinaigrette\management\commands\makemessages.py
line 168 to:
with open(po_path, encoding='utf-8') as po_file:
line 194 to:
with open(po_path, 'w', encoding='utf-8') as po_file:
The text was updated successfully, but these errors were encountered: