aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/nonascii.texi39
1 files changed, 19 insertions, 20 deletions
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 90244210e55..4a8205c178d 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -289,32 +289,31 @@ or @code{eight-bit-graphic}.
289@section Character Codes 289@section Character Codes
290@cindex character codes 290@cindex character codes
291 291
292 The unibyte and multibyte text representations use different character 292 The unibyte and multibyte text representations use different
293codes. The valid character codes for unibyte representation range from 293character codes. The valid character codes for unibyte representation
2940 to 255---the values that can fit in one byte. The valid character 294range from 0 to 255---the values that can fit in one byte. The valid
295codes for multibyte representation range from 0 to 524287, but not all 295character codes for multibyte representation range from 0 to 4194303,
296values in that range are valid. The values 128 through 255 are not 296but not all values in that range are valid. The values 128 through
297entirely proper in multibyte text, but they can occur if you do explicit 297255 do not usually show up in multibyte text, but they can occur if
298encoding and decoding (@pxref{Explicit Encoding}). Some other character 298you do explicit encoding and decoding (@pxref{Explicit Encoding}).
299codes cannot occur at all in multibyte text. Only the @acronym{ASCII} codes 299Some other character codes cannot occur at all in multibyte text.
3000 through 127 are completely legitimate in both representations. 300Only the @acronym{ASCII} codes 0 through 127 are completely legitimate
301 301in both representations.
302@defun char-valid-p charcode &optional genericp 302
303This returns @code{t} if @var{charcode} is valid (either for unibyte 303@defun characterp charcode
304text or for multibyte text). 304This returns @code{t} if @var{charcode} is a valid character, and
305@code{nil} otherwise.
305 306
306@example 307@example
307(char-valid-p 65) 308(characterp 65)
308 @result{} t 309 @result{} t
309(char-valid-p 256) 310(characterp 256)
310 @result{} nil 311 @result{} nil
311(char-valid-p 2248) 312(characterp 4194303)
312 @result{} t 313 @result{} t
314(characterp 4194304)
315 @result{} nil
313@end example 316@end example
314
315If the optional argument @var{genericp} is non-@code{nil}, this
316function also returns @code{t} if @var{charcode} is a generic
317character (@pxref{Splitting Characters}).
318@end defun 317@end defun
319 318
320@node Character Sets 319@node Character Sets