Character encoding
Character Encodings are methods of representing characters of text, usually as numeric values which can be stored on computers as bits and bytes, but sometimes in other things (e.g., Braille represents them as patterns of raised dots). Sometimes they're also referred to as "character sets", but purists will make a distinction in that, strictly speaking, a character set is merely a repertoire of characters, the list of characters supported by some system, protocol, or file format, without it necessarily having any inherent order or numbering system. A character encoding assigns specific values (in some coding system) to each character. However, the distinction can get vague and fuzzy; there are multiple levels of abstraction (Unicode includes a set of defined characters as well as assigned numeric code points for each, but leaves it to other more specific encodings such as UTF-8 to define the specific bits/bytes that represent them in a file), and some protocols even use parameter names such as 'charset' to indicate which character encoding is in use, so the terminology can slip and slide even in "tech" uses. This section documents all the various sorts of character sets/encodings of any sort.
See Fonts for the renditions of character encodings as seen on screens and printouts. The appearance of a character is known as a "glyph", and a font consists of a set of glyphs mapped onto the more abstractly-defined characters as included in the character set that is part of a character encoding.
Contents |
Specific character sets or encodings
- Adobe Standard Encoding
- Amstrad CP/M Plus character set
- ANSEL
- APL code page
- Apple II character set
- ARMSCII
- ASCII
- ATASCII (used by Atari computers)
- Baudot code
- Braille
- Compucolor character set
- DEC (Digital Equipment Corporation)
- EBCDIC
- Flag semaphore
- GB 2312
- IBM: See EBCDIC, MS-DOS Encodings, and APL Code Page elsewhere in this list
- ISO 646
- ISO 646-CA · ISO 646-CA2 · ISO 646-CH · ISO 646-CN · ISO 646-CU · ISO 646-DE · ISO 646-DK · ISO 646-ES · ISO 646-ES2 · ISO 646-FI · ISO 646-FR · ISO 646-FR1 · ISO 646-GB · ISO 646-HU · ISO 646-IE · ISO 646-IRV · ISO 646-IS · ISO 646-IT · ISO 646-JP · ISO 646-JP OCR-B · ISO 646-KR · ISO 646-MT · ISO 646-NL · ISO 646-NO · ISO 646-NO2 · ISO 646-PT · ISO 646-SE · ISO 646-SE2 · ISO 646-US · ISO 646-YU
- ISO 2022
- ISO 8859
- ISO 8859-1 · ISO 8859-2 · ISO 8859-3 · ISO 8859-4 · ISO 8859-5 · ISO 8859-6 · ISO 8859-7 · ISO 8859-8 · ISO 8859-9 · ISO 8859-10 · ISO 8859-11 · ISO 8859-13 · ISO 8859-14 · ISO 8859-15 · ISO 8859-16
- JIS
- KOI8
- Macintosh encodings
- MacCE · MacCyrillic · MacDingbats · MacGreek · MacGujarati · MacGurmukhi · MacIcelandic · MacRoman · MacRomania · MacSymbol · MacThai · MacTurkish
- Mattel Aquarius character set
- Morse code
- MS-DOS encodings (IBM PC code pages)
- Palm OS character set
- PETSCII (or PET ASCII or CBM ASCII; used by Commodore computers)
- Unicode
- VISCII
- Windows encodings
- ZSCII, used in Infocom games
Format details
- Byte Order Mark
- C0 controls (ASCII control characters, 7 bit)
- C1 controls (extended control characters, 8 bit)
Character encoding naming and numbering systems
Character escape codes
(used to enter characters in various systems and formats)
- Alt codes (DOS/Windows)
- Backslash escapes (used in various programming and markup languages)
- HTML character references (entities and numeric values)
See also ANSI escape code.
Character memory storage types
C++
- char (C++) at least 8 bits
- char16_t no less than 16 bits, no less than char
- char32_t no less than 32 bits, no less than char16_t
- wchar_t whatever the largest block of addressable memory happens to be on the system
Glib library
- gunichar Unicode character (variable memory length)
Java Virtual Machine
- char (Java) exactly 16 bits that represent UCS2
- java.lang.Character exactly 16 bits that represent UCS2 wrapped in an object
.Net framework
- System.Char exactly 16 bits that represent UCS2 (This is C#'s char)
Pascal
Traditionally, Pascal stored 8-bit characters (in system-specific character sets), and some implementations also had a 'string' type that was an array of characters with the zeroth element containing the number of characters in the string (maximum 255). Newer Pascal implementations have a variety of other types. [1]
QuickBasic
There is no single character datatype. (There's STRING that holds up to 32767 characters assumed to be 1 byte each).
Scala
Both char and scala.Char are wrappers around JVM's original types.
Tools
Commentary and satire
- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) by Joel Spolsky
- The Language Double-Take: Dealing with Bidirectional Text (or: Wait, ?tahW)
- Character encoding bugs are 𝒜wesome!
- xkcd: Encoding
- 8 New Punctuation Marks We Desperately Need
- 8 Symbols We Turned Into Words
- I Can Text You A Pile of Poo, But I Can’t Write My Name
Other external links
- Lots of character encoding charts
- The Evolution of Character Codes, 1874–1968
- Collection of character encodings
References
- Ken Lunde, CJKV Information Processing, O'Reilly 2008, ISBN 978-0-596-51447-1 (has lots of information on encodings and Unicode in general, not only for CJKV locales)
- IBM 3270 character set reference (1987)