Windows NT shell + extended characters. Bug or what?

Jeff Shannon jeff at ccvcorp.com
Fri Mar 15 19:05:33 EST 2002


Noel Smith wrote:

> However I've recently installed python 7.2 on Windows NT4

Wow!  7.2 ?  They really *have* sped up the release cycle...  <wink>


> and found it
> gives the following results when using the command line shell:
>
> >>> print ord('£')
> 156
> >>> print ord('¥')
> 157
>
> Which is clearly wrong although strangely enough when I type the same
> thing into IDLE on Windows NT, it produces the correct results.

I believe that the issue here is that Windows does not typically use the
Latin-1 codepage.  You'll have to use the unicode methods to convert to
Latin-1.

Jeff Shannon
Technician/Programmer
Credit International

P.S.  Not that I know what I'm talking about, but hey, this is Usenet --
when has that ever stopped anyone??   <wink>





More information about the Python-list mailing list