This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author umedoblock
Recipients umedoblock
Date 2013-02-08.01:31:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360287078.84.0.489107561293.issue17156@psf.upfronthosting.co.za>
In-reply-to
Content
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 ""
History
Date User Action Args
2013-02-08 01:31:19umedoblocksetrecipients: + umedoblock
2013-02-08 01:31:18umedoblocksetmessageid: <1360287078.84.0.489107561293.issue17156@psf.upfronthosting.co.za>
2013-02-08 01:31:18umedoblocklinkissue17156 messages
2013-02-08 01:31:17umedoblockcreate