ElementTree and utf-16 encoding
Sébastien Boisgérault
Sebastien.Boisgerault at gmail.com
Tue Dec 19 04:59:42 EST 2006
On Dec 19, 10:49 am, Fredrik Lundh <fred... at pythonware.com> wrote:
> Sébastien Boisgérault wrote:
> > ET being ElementTree in the following code, could anyone explain
> > why it fails ?I'm afraid the standard serializer in 1.2 only supports ASCII-compatible
> encodings. this will be fixed in 1.3.
>
> as a workaround, you can do:
>
> tostring(elem).decode("utf-8").encode("utf-16")
>
> </F>
OK, thanks.
SB
More information about the Python-list
mailing list