ignoring chinese characters parsing xml file

Fabian López fabian at syameses.com
Mon Oct 22 15:24:40 EDT 2007


Hi,
I am parsing an XML file that includes chineses characters, like ^
ÔuÔuà¢à¢²ÅÊDZw.¼ššìéLï³²ÅÊÇÛ or ¥Ø¥¢¥¢¥¤¥í¥ó... The problem is that I get an error like:
UnicodeEncodeerror:'charmap' codec can't encode characters in position....
The thing is that I would like to ignore it and parse all the characters
less these ones. So, could anyone help me? I suppose that I can catch an
exception that ignores it or maybe use any function that detects this
chinese characters and after that ignore them.

Thanks!!
Fabian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071022/ddda9de8/attachment.html>


More information about the Python-list mailing list