Re: [xml] python, xml, utf8->iso-8859-2 problem
- From: Hannu Krosing <hannu tm ee>
- To: Pavel Stehule <stehule kix fsv cvut cz>
- Cc: Daniel Veillard <veillard redhat com>, xml gnome org
- Subject: Re: [xml] python, xml, utf8->iso-8859-2 problem
- Date: 18 Feb 2003 19:19:45 +0200
Pavel Stehule kirjutas T, 18.02.2003 kell 10:17:
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ùò")
try:
element.newChild(None,"beta",u"¾lutý kùò".encode('utf-8'))
so yout automatic conversion from sitecustomize.py makes the u"xxx" part
convert from iso-8859-2 to pythons internal unicode UCS-2 (or UCS-4) and
the encode('utf-8') part makes libxml2 happy by giving it a
non-python-unicode 8-byte utf-8 string ;)
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]