Fixed a bug in xml2po

http://bugzilla.gnome.org/show_bug.cgi?id=437371#c4

The condition to trigger the bug is that opening tag or the content of the tag contains non-ascii chars. e.g:
<title>Quotes are for weak people, strong people have their own opinions
- Dawid Węgliński (cla)</title>
<body>
<figure link="/images/gwn/20070917_cla.jpg"
short="cla" caption="Dawid Węgliński, aka cla"/>

The symptom is:
Stack trace:
Traceback (most recent call last):
File "xml2po.py", line 856, in ?
doSerialize(doc)
File "xml2po.py", line 589, in doSerialize
outtxt += doSerialize(child)
File "xml2po.py", line 583, in doSerialize
(starttag, content, endtag, translation) = processElementTag(node, repl, 1)
File "xml2po.py", line 525, in processElementTag
translation = translation.replace('' % (i), replacement)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
635: ordinal not in range(128)

Comments

Anonymous said…
Erm, so my name's broken that app? ;o
r0bertz said…
that app itself is broken, ;)

Popular posts from this blog

portage-2.2 preserve-libs FEATURES explained

Send $SGB (Songbird) to another wallet using a script

The diff between the original SEC complaint against Ripple and the amended one