iterparse and unicode

Fredrik Lundh fredrik at pythonware.com
Thu Aug 21 01:34:09 EDT 2008


George Sakkis wrote:

> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "<string>", line 64, in __iter__
> UnicodeEncodeError: 'ascii' codec can't encode characters in position
> 6-15: ordinal not in range(128)
> 
> Am I using it incorrectly or it doesn't currently support unicode ?

iterparse parses XML documents.  XML documents are streams of encoded 
characters, not streams of Unicode characters.

</F>




More information about the Python-list mailing list