Dan Sugalski <[EMAIL PROTECTED]> writes:
>At 05:09 PM 3/23/2001 -0800, Damien Neil wrote:
>>So the results of ord are dependent on a global setting for "current
>>character set" or some such, not on the encoding of the string that
>>is passed to it?
>
>Nope, ord is dependent on the string it gets, as those strings know what 
>their encoding is. 

And the code knows what it wants: if I am in an EBCDIC context
then I am going to expect ord to be ones I am used to.
This the main pain with 5.7.*'s EBCDIC scheme - making 

   ord('A') == 193 

true :-/

> chr is the one dependent on the current default encoding.

You are going to see both used in legacy stuff.

-- 
Nick Ing-Simmons

Reply via email to