Using more than 7 bit ASCII on windows.

Alex Martelli aleaxit at yahoo.com
Mon Oct 30 04:38:04 EST 2000


"Mark Hammond" <MarkH at ActiveState.com> wrote in message
news:39FCB40B.6090509 at ActiveState.com...
    [snip]
> Please try applying this, and let me know if it works.  If I use the
    [snip]
> Which is the same as what I get for Python.exe...

Here is the behavior I observe.  Pythonwin #135 with your
fixes from your website plus the one you suggest here (this
is the Italian word "cioé" -- last letter being e-acute):


>>> a='cioé'
>>> a
'cio\351'
>>> print a
cioé
>>> unicode(a,'mbcs')
u'cio\351'
>>> for i in a:
...  print ord(i)
...
99
105
111
233
>>>


In Python 2.0's python.exe running in a 'Command Prompt'
"dos-box":

>>> a='cioé'
>>> a
'cio\202'
>>> print a
cioé
>>> unicode(a,'mbcs')
u'cio\u201A'
>>> for i in a:
...     print ord(i)
...
99
105
111
130
>>>


Not sure what's going on here...?  Perhaps an 'OEM codepage'
in the dos-box versus another in PythonWin...?


Alex






More information about the Python-list mailing list