<br><br><div class="gmail_quote">2009/5/25 Alexander Shigin <span dir="ltr"><<a href="mailto:shigin@rambler-co.ru">shigin@rambler-co.ru</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
В Пнд, 25/05/2009 в 10:54 -0500, Ovnicraft пишет:<br>
<div class="im">> Hi folks, when do this, encoding='iso-8859-1' write xml enconding ok,<br>
> but when try the same thing with 'UTF-8', not appears in my file, i<br>
> have 2.2 version.<br>
> How i can encoding my file with utf-8?<br>
<br>
</div>Can you give your code snippet? UTF-8 works fine for me.<br>
<br>
Here is an example:<br>
In [6]: print etree.tostring(etree.Element(unicode('ыъъ', 'utf-8')), encoding='utf-8')<br>
<ыъъ/><br>
<br>
If you haven't got cyrillic letters:<br>
In [9]: etree.tostring(etree.Element(u'\u044b\u044a\u044a'), encoding='utf-8')<br>
Out[9]: '<\xd1\x8b\xd1\x8a\xd1\x8a/>'<br>
<br>
<br>
<br>
</blockquote></div><br>I write something very simple, <a href="http://lxml.pastebin.com/m3f8c5b9c">http://lxml.pastebin.com/m3f8c5b9c</a><br><br><br clear="all"><br>-- <br>Cristian Salamea<br>CEO GnuThink Software Labs<br>
Software Libre / Open Source<br>(+593-8) 4-36-44-48<br>