processing a large utf-8 file

"Martin v. Löwis" martin at v.loewis.de
Fri May 20 19:58:44 EDT 2005


Ivan Voras wrote:
> Since the .encoding attribute of file objects are read-only, what is the
> proper way to process large utf-8 text files?

You should use codecs.open, or codecs.getreader to get a StreamReader
for UTF-8.

Regards,
Martin



More information about the Python-list mailing list