Python's 8-bit cleanness deprecated?

Roman Suzi rnd at
Sun Feb 9 08:42:08 CET 2003

One more point, causing me to recall the encoding-cookie feature each time I
write new example for my article in the Russian educational journal

I can't make my example self-sufficient! I do not know before hand what
platform my example will be run on and thus I can't specify encoding-cookie!
And it's very ugly to add a remark to each example that "you need to
know your encoding and add one of the 

# -*- coding: cp1251 -*-
# -*- coding: cp866 -*-
# -*- coding: koi8-r -*-
# -*- coding: iso8859-5 -*-   # or is it iso8859_5 ?
# -*- coding: mac-cyrillic -*-   # not sure about -/_ either
# -*- coding: utf-8 -*-

to the first/second line."

And also, for a windows program which encoding do I specify? Windows console
historically uses cp866 while GUI uses cp1251.

Good service for potential Python newbies...

Sincerely yours, Roman Suzi
rnd at =\= My AI powered by Linux RedHat 7.3

More information about the Python-list mailing list