Special Characters in Console
Bernard Delmée
bdelmee at advalvas.REMOVEME.be
Wed Oct 1 18:08:50 EDT 2003
> # -*- coding: latin_1 -*-
>
> print "Mädchen"
> print "M\xE4dchen"
>
> Both statements produce a capital sigma where they ä should be. Typing
> "\xE4" directly in the console also spits back a sigma.
On the other hand if you capture the output in a file and then load
it in notepad/vim/pythonwin, you'll see that they look as expected...
> What encoding does the console use? Is there a way to get it to use
> latin-1?
Not that I know of. You might be interested in the win32 port
of the rxvt terminal which is bundled with the MSYS subproject
of the MINGW win32 port of gcc:
http://sourceforge.net/project/showfiles.php?group_id=2435
Regards,
Bernard.
More information about the Python-list
mailing list