Encoding problems

Gandalf gandalf at geochemsource.com
Thu Sep 2 16:30:27 EDT 2004


Michel Claveau - abstraction méta-galactique non triviale en fuite 
perpétuelle. wrote:

>Hi !
>
>
>On W-XP / W2K, you can solve the problem with :
>    - change the font of the console to "Lucida handwriter"
>    - change your script to :
>
># -*- coding: cp1252 -*-
>
>import os
>ecran=os.popen('MODE CON: CP SELECT=1252').readlines()
>
>s1 = 'néz'
>s2 = raw_input('Please type in "néz":')
>print repr(s1)
>print repr(s2)
>
Okay, I understand now.
This is a fault of the win32 console - it defaults to a different 
encoding than other parts of the Windows system.
This is messy but we cannot do anything about it. :-(

>*sorry for my bad english*
>
Not bad at all.
Thanks for your help.

   Laci 2.0





More information about the Python-list mailing list