New submission from umedoblock: I'd like to parse _('こんにちは'). However pygettext.py doesn't parse _('こんにちは'). pygettext.py said me 'IndexError'. now I attached pygettext.py.patch to fix a bug. I show you command history.
$ pygettext.py -o - --verbose konnichiha.py ... #: konnichiha.py:6 msgid "konnichiha" msgstr "" #: konnichiha.py:7 Traceback (most recent call last): File "/home/umetaro/local/bin/pygettext.py", line 664, in <module> main() File "/home/umetaro/local/bin/pygettext.py", line 657, in main eater.write(fp) File "/home/umetaro/local/bin/pygettext.py", line 497, in write print('msgid', normalize(k), file=fp) File "/home/umetaro/local/bin/pygettext.py", line 250, in normalize s = '"' + escape(s) + '"' File "/home/umetaro/local/bin/pygettext.py", line 236, in escape s[i] = escapes[ord(s[i])] IndexError: list index out of range please use pygettext.py.patch. $ pygettext.py -o - --verbose konnichiha.py ... #: konnichiha.py:6 msgid "konnichiha" msgstr "" #: konnichiha.py:7 msgid "こんにちは" msgstr "" ---------- components: Demos and Tools files: konnichiha.py messages: 181651 nosy: umedoblock priority: normal severity: normal status: open title: Tools/i18n/pygettext.py doesn't parse unicode string. type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file28991/konnichiha.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17156> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com