gtxml crashes with UnicodeDecodeError

Bug #910202 reported by Byrial Jensen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyG3T
Fix Committed
Undecided
Unassigned

Bug Description

$ cat da.po
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

msgid "<a>You did not specify the engine executable</a>"
msgstr "<a>Du angav ikke en kørbar motor<a>"
$ gtxml da.po
Traceback (most recent call last):
  File "/usr/bin/gtxml", line 5, in <module>
    gtxml.main()
  File "/usr/lib/python2.7/dist-packages/pyg3t/gtxml.py", line 160, in main
    for bad_msg, err in gtxml.check_msgs(cat):
  File "/usr/lib/python2.7/dist-packages/pyg3t/gtxml.py", line 53, in check_msgs
    self.check_msg(msg)
  File "/usr/lib/python2.7/dist-packages/pyg3t/gtxml.py", line 46, in check_msg
    self.check_string(msgstr)
  File "/usr/lib/python2.7/dist-packages/pyg3t/gtxml.py", line 25, in check_string
    xmlstring = self._filter(string)
  File "/usr/lib/python2.7/dist-packages/pyg3t/gtxml.py", line 21, in _filter
    xml = u''.join([u'<xml>', string.replace(u'\\"', u'"'), u'</xml>'])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)
$

Revision history for this message
Ask Hjorth Larsen (askhl) wrote :

Thanks. This should be fixed in trunk.

Changed in pyg3t:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.