Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

RE: Re: Chr and Ord

by lhoward (Vicar)
on Jun 16, 2000 at 06:20 UTC ( [id://18426]=note: print w/replies, xml ) Need Help??

in reply to Re: Chr and Ord
in thread Chr and Ord

Not true... If your platform uses a character set other than ASCII, chr and ord may behave differently:
On these platforms, bear in mind that the EBCDIC character set may have an effect on what happens with some perl functions (such as chr, pack, print, printf, ord, sort, sprintf, unpack), as well as bit-fiddling with ASCII constants using operators like ^, & and |, not to mention dealing with socket interfaces to ASCII computers (see NEWLINES).
Lifted from perlport. Also see the following quote from the same document:
Assume very little about character sets. Do not assume anything about the numerical values (ord(), chr()) of characters. Do not assume that the alphabetic characters are encoded contiguously (in numerical sense). Do no assume anything about the ordering of the characters. The lowercase letters may come before or after the uppercase letters, the lowercase and uppercase may be interlaced so that both 'a' and 'A' come before the 'b', the accented and other international characters may be interlaced so that comes before the 'b'.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://18426]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-22 23:25 GMT
Find Nodes?
    Voting Booth?

    No recent polls found