[lxml-dev] UTF-8 not supported
Ovnicraft
ovnicraft at gmail.com
Mon May 25 18:20:28 CEST 2009
2009/5/25 Alexander Shigin <shigin at rambler-co.ru>
> В Пнд, 25/05/2009 в 10:54 -0500, Ovnicraft пишет:
> > Hi folks, when do this, encoding='iso-8859-1' write xml enconding ok,
> > but when try the same thing with 'UTF-8', not appears in my file, i
> > have 2.2 version.
> > How i can encoding my file with utf-8?
>
> Can you give your code snippet? UTF-8 works fine for me.
>
> Here is an example:
> In [6]: print etree.tostring(etree.Element(unicode('ыъъ', 'utf-8')),
> encoding='utf-8')
> <ыъъ/>
>
> If you haven't got cyrillic letters:
> In [9]: etree.tostring(etree.Element(u'\u044b\u044a\u044a'),
> encoding='utf-8')
> Out[9]: '<\xd1\x8b\xd1\x8a\xd1\x8a/>'
>
>
>
>
I write something very simple, http://lxml.pastebin.com/m3f8c5b9c
--
Cristian Salamea
CEO GnuThink Software Labs
Software Libre / Open Source
(+593-8) 4-36-44-48
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20090525/70c5a1ab/attachment.htm
More information about the lxml-dev
mailing list