[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

33.4 Character Codes

The unibyte and multibyte text representations use different character codes. The valid character codes for unibyte representation range from 0 to 255--the values that can fit in one byte. The valid character codes for multibyte representation range from 0 to 524287, but not all values in that range are valid. The values 128 through 255 are not entirely proper in multibyte text, but they can occur if you do explicit encoding and decoding (see section 33.10.7 Explicit Encoding and Decoding). Some other character codes cannot occur at all in multibyte text. Only the ASCII codes 0 through 127 are completely legitimate in both representations.

Function: char-valid-p charcode &optional genericp
This returns t if charcode is valid for either one of the two text representations.

 
(char-valid-p 65)
     => t
(char-valid-p 256)
     => nil
(char-valid-p 2248)
     => t

If the optional argument genericp is non-nil, this function returns t if charcode is a generic character (see section 33.7 Splitting Characters).



This document was generated on May 2, 2002 using texi2html