Next: , Previous: Floating Point Type, Up: Programming Types

2.3.3 Character Type

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.