[Tutor] wierd error in comment string

denis denis.spir at free.fr
Sun Apr 25 18:25:59 EDT 2004

Dave :
>I have to tell python to use a character set which includes a £ ?

Magnus :
If you use IDLE, it will tell you what to do, and even fix the
file for you if you wish. Otherwaise, add something like

# -*- coding: cp1252 -*-


# -*- coding: iso8859_1 -*-

as the first or second line in the file.

(This is a new inconvenience from Python 2.3. I'm happy
to see it bite English speaking people as well! ;)

Denis :
Would you add some contents on this ? Why doesn't python accept iso8859-1
character set anymore ?
I just did a test on french weird characters, which were previously
processed and, as you suggest :
they're not anymore more :-(
The standard 8-bit extended ASCII / ANSI set holds af them, as well as the
iso 8859-1 set and the first unicode page of 256 characters.

More information about the Tutor mailing list