Saturday, October 06, 2007

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)

2 Comments:

Anonymous Dawid Węgliński said...

Erm, so my name's broken that app? ;o

10/10/2007 6:17 PM  
Blogger Zhang Le said...

that app itself is broken, ;)

10/11/2007 12:43 AM  

Post a Comment

Links to this post:

Create a Link

<< Home