Thanks, I have tried all you told me. It was an error on print statement. So I decided to catch the exception if I had an UnicodeEncodeError, that is, if I had chinese/japanese characters because they don't interest to me and it worked. 
<br>The strip_asian function of Ryan didn't work well here, but it's a good idea for next goals. <br>Thanks a lot!<br>Fabian<br><br><div><span class="gmail_quote">2007/10/23, limodou <<a href="mailto:limodou@gmail.com">
limodou@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 10/23/07, Stefan Behnel <<a href="mailto:stefan.behnel-n05pAM@web.de">
stefan.behnel-n05pAM@web.de</a>> wrote:<br>> Fabian López wrote:<br>> > Thanks Mark, the code is like this. The attrib name is the problem:<br>> ><br>> > from lxml import etree<br>> ><br>> > context = 
etree.iterparse("file.xml")<br>> > for action, elem in context:<br>> >     if elem.tag == "weblog":<br>> >         print action, elem.tag , elem.attrib["name"],elem.attrib["url"],
<br>><br>> The problem is the print statement. Looks like your terminal encoding (that<br>> Python needs to encode the unicode string to) can't handle these unicode<br>> characters.<br>><br>I agree. For Japanese, you should know the exactly encoding name, and
<br>convert them, just like:<br><br>print text.encoding('encoding')<br><br>--<br>I like python!<br>UliPad <<The Python Editor>>: <a href="http://code.google.com/p/ulipad/">http://code.google.com/p/ulipad/
</a><br>meide <<wxPython UI module>>: <a href="http://code.google.com/p/meide/">http://code.google.com/p/meide/</a><br>My Blog: <a href="http://www.donews.net/limodou">http://www.donews.net/limodou</a><br>--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>