Open anentropic opened 5 years ago
Hi @anentropic, thanks for opening the issue and sorry for not getting back to you any sooner. Could you provide a minimal example as file that exhibits this problem?
In general, are you sure the file is ASCII-8BIT
encoded? It says charset=UTF-8
directly above... Did you encounter any problems without the --encoding
parameter?
Twine version 1.0.6
Unfortunately the unhandled exception does not give any information about the location of the bad char within the file.
We're using these .po files fine in our Django project so I'm not sure they really contain any wrongly encoded data.
At the top of the file there's an entry like:
if I use
--encoding=ASCII-8BIT
:then it logs
Adding new definition <msg id>
for all the messages in the .po but fails when writing result to thetwine.txt
with this error:If I modify
django.rb
in twine like:...then I'm able to get complete output in my
twine.txt
file with no errors.Curiously the replacement
BADCHAR
does not appear anywhere in the output.