A character in Emacs Lisp is nothing more than an integer. In other words, characters are represented by their character codes. For example, the character A is represented as the integer 65.
Individual characters are used occasionally in programs, but it is more common to work with strings, which are sequences composed of characters. See String Type.
Characters in strings and buffers are currently limited to the range of 0 to 4194303—twenty two bits (see Character Codes). Codes 0 through 127 are ASCII codes; the rest are non-ASCII (see Non-ASCII Characters). Characters that represent keyboard input have a much wider range, to encode modifier keys such as Control, Meta and Shift.
There are special functions for producing a human-readable textual description of a character for the sake of messages. See Describing Characters.
• Basic Char Syntax: | Syntax for regular characters. | |
• General Escape Syntax: | How to specify characters by their codes. | |
• Ctl-Char Syntax: | Syntax for control characters. | |
• Meta-Char Syntax: | Syntax for meta-characters. | |
• Other Char Bits: | Syntax for hyper-, super-, and alt-characters. |
Copyright © 1990-1996, 1998-2019 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Character-Type.html