[previous] [up] [next]     [index]
Next: Strings Up: Basic Data Extensions Previous: Numbers

Characters

MzScheme character values range over the characters for ``extended ASCII'' values 0 to 255 (where the ASCII extensions are platform-specific). The procedure char->integer returns the extended ASCII value of a character and integer->char takes an extended ASCII value and returns the corresponding character. If integer->char is given an integer that is not in 0 to 255 inclusive, the exn:application:type exception is raised.

The procedures char->latin-1-integer and latin-1-integer->char support conversions between characters in the platform-specific character set and platform-independent Latin-1 (ISO 8859-1) values:

For Unix and BeOS, char->latin-1-integer and latin-1-integer->char are the same as char->integer and integer->char. For Windows, the platform-specific set and Latin-1 match except for the range #x80 to #x9F (which are unprintable control characters in Latin-1). For MacOS, the mapping between Latin-1 and the platform-specific character set (``MacRoman'') is complex, and several printable characters in each set have no corresponding character in the other set.

The character comparison procedures -- char=?, char-ci=?, etc. -- take one or more character arguments and check the arguments pairwise (like the numerical comparison procedures).



PLT