Next: , Previous: , Up: Strings and Characters   [Contents][Index]


10.5 Character Codes

Function: char-int character

This function converts a character into an equivalent integer. The resulting integer will always be non-negative. The integers in the range 0 - 255 map to characters as follows:

0 - 31

Control set 0

32 - 127

ASCII

128 - 159

Control set 1

160 - 255

Right half of ISO-8859-1

If support for MULE does not exist, these are the only valid character values. When MULE support exists, the values assigned to other characters may vary depending on the particular version of SXEmacs, the order in which character sets were loaded, etc., and you should not depend on them.

Function: int-char integer

This function converts an integer into the equivalent character. Not all integers correspond to valid characters; use char-int-p to determine whether this is the case. If the integer cannot be converted, nil is returned.

Function: char-int-p object

This function returns t if object is an integer that can be converted into a character.

Function: char-or-char-int-p object

This function returns t if object is a character or an integer that can be converted into one.