<br><br><div class="gmail_quote">2009/5/25 Alexander Shigin <span dir="ltr">&lt;<a href="mailto:shigin@rambler-co.ru">shigin@rambler-co.ru</a>&gt;</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">&gt; Hi folks, when do this, encoding=&#39;iso-8859-1&#39; write xml enconding ok,<br>
&gt; but when try the same thing with &#39;UTF-8&#39;, not appears in my file, i<br>
&gt; have 2.2 version.<br>
&gt; 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(&#39;ыъъ&#39;, &#39;utf-8&#39;)), encoding=&#39;utf-8&#39;)<br>
&lt;ыъъ/&gt;<br>
<br>
If you haven&#39;t got cyrillic letters:<br>
In [9]: etree.tostring(etree.Element(u&#39;\u044b\u044a\u044a&#39;), encoding=&#39;utf-8&#39;)<br>
Out[9]: &#39;&lt;\xd1\x8b\xd1\x8a\xd1\x8a/&gt;&#39;<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>