Re: [xml] python, xml, utf8->iso-8859-2 problem
- From: Pavel Stehule <stehule kix fsv cvut cz>
- To: Daniel Veillard <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] python, xml, utf8->iso-8859-2 problem
- Date: Tue, 18 Feb 2003 09:17:50 +0100 (CET)
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 sitecusyomize.py I have
encoding="iso-8859-2"
sys.setdefaultencoding(encoding)
PS
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
read http://xmlsoft.org/encoding.html
All tree operation must be UTF8
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]