Re: [xml] python, xml, utf8->iso-8859-2 problem

On Mon, 17 Feb 2003, Daniel Veillard wrote:

On Mon, Feb 17, 2003 at 08:09:09PM +0100, Pavel Stehule wrote:
element.newChild(None,"beta","¾lutý kùò")

This string is in iso-8859-2 encoding. Conversion iso-8859-2 (latin2) to 
utf8 is ok. I have problem with latin2->utf->latin2 conversion. In 
documentation you write, so I can use iconv. What is mean? And so can I 
use own conversion handler? But I didn't find any documentation about it 
on internet. I have problem only with serialisation.

in my I have



  Your error. What encoding is that string ? I MUST be UTF8, it
doesn't loom like it is

print  doc.serialize("iso-8859-2")
output conversion failed due to conv error
Bytes: 0xBE 0x6C 0x75 0x74
xmlOutputBufferFlush: encoder error

All tree operation must be UTF8


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]