comparison man/lispref/objects.texi @ 3367:84ee3ca77e7f

[xemacs-hg @ 2006-04-29 14:36:49 by aidan] Support Unicode escapes in the Lisp reader, taking the syntax from C#.
author aidan
date Sat, 29 Apr 2006 14:36:57 +0000
parents bc9eadea35cf
children c136144fe765
comparison
equal deleted inserted replaced
3366:db585a1b4d86 3367:84ee3ca77e7f
508 with the @key{META} key set, thus the @samp{M}; however, it conflicts 508 with the @key{META} key set, thus the @samp{M}; however, it conflicts
509 with the legitimate @sc{iso}-8859-1 interpretation of the character code. 509 with the legitimate @sc{iso}-8859-1 interpretation of the character code.
510 For example, character code 193 is a lowercase @samp{a} with an acute 510 For example, character code 193 is a lowercase @samp{a} with an acute
511 accent, in @sc{iso}-8859-1.) 511 accent, in @sc{iso}-8859-1.)
512 512
513 @cindex unicode character escape
514 From version 21.5.25 onwards, XEmacs provides a syntax for specifying
515 characters by their Unicode code points. @samp{?\uABCD} will give you
516 an XEmacs character that maps to the code point @samp{U+ABCD} in
517 Unicode-based representations (UTF-8 text files, Unicode-oriented fonts,
518 etc.) Just as in the C# language, there is a slightly different syntax
519 for specifying characters with code points above @samp{#xFFFF};
520 @samp{\U00ABCDEF} will give you an XEmacs character that maps to the
521 code point @samp{U+ABCDEF} in Unicode-based representations, if such an
522 XEmacs character exists.
523
524 Unlike in C#, while this syntax is available for character literals,
525 and (see later) in strings, it is not available elsewhere in your Lisp
526 source code.
527
513 @ignore @c None of this crap applies to XEmacs. 528 @ignore @c None of this crap applies to XEmacs.
514 For use in strings and buffers, you are limited to the control 529 For use in strings and buffers, you are limited to the control
515 characters that exist in @sc{ascii}, but for keyboard input purposes, 530 characters that exist in @sc{ascii}, but for keyboard input purposes,
516 you can turn any character into a control character with @samp{C-}. The 531 you can turn any character into a control character with @samp{C-}. The
517 character codes for these non-@sc{ascii} control characters include the 532 character codes for these non-@sc{ascii} control characters include the
612 @cindex question mark in character constant 627 @cindex question mark in character constant
613 @cindex @samp{\} in character constant 628 @cindex @samp{\} in character constant
614 @cindex backslash in character constant 629 @cindex backslash in character constant
615 @cindex octal character code 630 @cindex octal character code
616 @cindex hexadecimal character code 631 @cindex hexadecimal character code
632
617 Finally, there are two read syntaxes involving character codes. 633 Finally, there are two read syntaxes involving character codes.
618 It is not possible to represent multibyte or wide characters in this 634 It is not possible to represent multibyte or wide characters in this
619 way; the permissible range of codes is from 0 to 255 (@emph{i.e.}, 635 way; the permissible range of codes is from 0 to 255 (@emph{i.e.},
620 @samp{0377} octal or @samp{0xFF} hexadecimal). If you wish to convert 636 @samp{0377} octal or @samp{0xFF} hexadecimal). If you wish to convert
621 code points to other characters, you must use the @samp{make-char} or 637 code points to other characters, you must use the @samp{make-char} or