Michael McFadden added the comment: I'm having no luck reproducing this issue.
Regarding pygettext.py generating .po files: I've used the messages.po file provided by the OP, and also using a generated .po file from pygettext.py with the offending header PO-Revision-Date: As a side note, I'm not quite sure how you can get pygettext.py to generate anything but "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE" in python 3.3+, because it's a static line. Regarding gettext.py 1: Tools/msgfmt.py -o locales/testlang/LC_MESSAGES/messages.mo locales/testlang/LC_MESSAGES/messages.po (all is good) 2: Run this simple script: import gettext t = gettext.translation('messages', localedir='mytests/locales', languages=['testlang'], ) _ = t.gettext print('------------') print(_('TestMe')) print('------------') Works without exceptions. The only way I can recreate this issue is by saving my po file in a non-utf8 format (latin-1) and running the above code. It fails perfectly. Can you help me recreate your issue? ---------- nosy: +flipmcf _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19907> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com