Unicode output to file

Евгений Косенко eugine_kosenko at ukr.net
Tue Dec 2 17:33:28 EST 2003


В сообщении от 1 Декабрь 2003 08:53 Martin v. Löwis написал(a):
> =?windows-1251?b?xeLj5e3o6SDK7vHl7eru?= <eugine_kosenko at ukr.net> writes:
> > I use here Russian letters, and need special encoding for them. The
> > property 'encoding' is read-only, and is None by default. How to
> > cast the encoding for a file?
>
> You should use codecs.open instead of the builtin open function; this
> allows you to pass an encoding for the file stream.

Big thanks! This just helped me!





More information about the Python-list mailing list