Getting strange characters in the command prompt

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Tue Jan 6 20:20:29 EST 2004


sebb wrote:

[...]
> ... 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?

Does executing

   chcp 1252

before running your python program help?
The windows console is not set to code page 1252 by default
as far as I know, but some other windows-specific encoding.

--Irmen



More information about the Python-list mailing list