Python STILL prints the wrong international letters

David LeBlanc whisper at oz.nospamnet
Fri May 18 13:50:34 EDT 2001


In article <mailman.990179668.8204.python-list at python.org>, 
maxm at normik.dk says...
> > From: Michael Str=F6der [mailto:michael at stroeder.com]
> > Brian wrote:
> > > Python 2.0, win 98, no problemos med mobilos
> 
> ;-)
> 
> > > C:\WINDOWS>python
> > > Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on =
> win32
> > > Type "copyright", "credits" or "license" for more information.
> > > >>> print '=E6=F8=E5'
> > > =E6=F8=E5
> > > >>>
> >=20
> > Me too. ;-)
> >=20
> > Python 2.1 (#8, Apr 20 2001, 19:22:23)=20
> > [GCC 2.95.2 19991024 (release)] on linux2
> > Type "copyright", "credits" or "license" for more information.
> > >>> print '=E6=F8=E5'
> > =E6=F8=E5
> 
> Well actually me too, but only when I start Python from an ordinary =
> window
> prompt.
> 
> >>> print '=E6=F8=E5=C6=D8=C5'
> =E6=F8=E5=C6=D8=C5=20
> 
> From PyWin I still get garbage when printing.
> 
> The following produces garbage from the windows prompt though :-(
> 
> >>> f =3D open('c:/temp/maxm_out.txt', 'w')
> >>> f.write('=E6-=F8-=E5-=C6-=D8-=C5')
> >>> f.close()
> 
> regards
> 
>     Max M
> 
> 
It seems reasonable to me that the encoding the GUI is using is not the 
same that the console is using - dunno why. In Tcl there are ways to set 
the encoding of an incoming stream - is there the like in Python?

Dave LeBlanc



More information about the Python-list mailing list