Non-ascii characters in an MSDOS window

Bartolomé Sintes Marco BartolomeSintes at ono.com
Fri Oct 18 04:56:48 EDT 2002


I do try to understand and I thank your help and patience.
I have tried again Bengt's program and now it runs fine.

If I define
    def write(self, s):
        self.so.write(s.decode('latin-1').encode('cp850'))
the correct accents are showed in the command line window,
but are not in IDLE.

If I define
    def write(self, s):
        self.so.write(s.decode('latin-1').encode('cp1252'))
the correct accents are showed in IDLE, but not in the command
line window.

I understand that Python is not to "blame", but Windows. So,
is it not possible to have the same output in a command line windows
and in a GUI window?

Best regards,
Barto





More information about the Python-list mailing list