file - codecs - unicode ???

Fredrik Lundh fredrik at pythonware.com
Tue Mar 13 05:09:03 EST 2001


Sébastien Libert wrote:

> >>> f=open("c:\\mylog.log")

better make that:

    f=open("c:\\mylog.log", "rb")

> >>> fline=f.readline()
> >>> fline=unicode(fline,'UTF-16').encode('utf-8')

Cheers /F





More information about the Python-list mailing list