Getting strange characters in the command prompt

sebb sebb at linuxcult.com
Wed Jan 7 02:04:19 CET 2004


For information, I have windows xp (english edition).

When I use special non-english characters (like é à è ...) in my
python code, IDLE tells me to add a line like:

# -*- coding: cp1252 -*-

... because of the presence of non-ASCII characters.

When I write a script like the folowing:

# -*- coding: cp1252 -*-
print "é à è"

... and I run it in the windows command prompt, I get strange
characters I didn't ask for.

And when I write those non-English characters (é à è) directly in the
command prompt, I get the correct characters.

Can anyone help we with that problem?



More information about the Python-list mailing list