charsets(7)
โจ NAME โจ
charsets โ character set standards and internationalization, bestie. That's the whole serve. ๐
๐ธ DESCRIPTION ๐ธ
Okay so this page is giving you the whole overview of different character set standards and how they were used on Linux before Unicode became ubiquitous. Some of this info is still helpful for people working with legacy systems and documents. ๐
Standards discussed include such as ASCII, GB 2312, ISO/IEC 8859, JIS, KOI8-R, KS, and Unicode. Yes, the list is iconic. โจ
The primary emphasis is on character sets that were actually used by locale character sets, not the myriad others that could be found in data from other systems. Periodt. ๐
๐ ASCII ๐
ASCII (American Standard Code For Information Interchange) is the original 7-bit character set, originally designed for American English. Also known as US-ASCII. It is currently described by the ISO/IEC 646:1991 IRV (International Reference Version) standard. โจ
Various ASCII variants replacing the dollar sign with other currency symbols and replacing punctuation with non-English alphabetic characters to cover German, French, Spanish, and others in 7 bits emerged. All are deprecated; glibc does not support locales whose character sets are not true supersets of ASCII. So don't try it, bestie. ๐
As Unicode, when using UTF-8, is ASCII-compatible, plain ASCII text still renders properly on modern UTF-8 using systems. Slay. ๐
๐ฆ ISO/IEC 8859 ๐ฆ
ISO/IEC 8859 is a series of 15 8-bit character sets, all of which have ASCII in their low (7-bit) half, invisible control characters in positions 128 to 159, and 96 fixed-width graphics in positions 160โ255. ๐
Of these, the most important is ISO/IEC 8859-1 ("Latin Alphabet No. 1" / Latin-1). It was widely adopted and supported by different systems, and is gradually being replaced with Unicode. The ISO/IEC 8859-1 characters are also the first 256 characters of Unicode. โจ
Console support for the other ISO/IEC 8859 character sets is available under Linux through user-mode utilities (such as setfont(8)) that modify keyboard bindings and the EGA graphics table and employ the "user mapping" font table in the console driver. Lowkey important.
Here are brief descriptions of each character set:
๐ ISO/IEC 8859-1 (Latin-1) ๐
Latin-1 covers many European languages such as Albanian, Basque, Danish, English, Faroese, Galician, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish. The lack of the ligatures Dutch ฤฒ/ฤณ, French ล, and โGermanโ quotation marks was considered tolerable. ๐ซถ
๐ธ ISO/IEC 8859-2 (Latin-2) ๐ธ
Latin-2 supports many Latin-written Central and East European languages such as Bosnian, Croatian, Czech, German, Hungarian, Polish, Slovak, and Slovene. Replacing Romanian ศ/ศ with ล/ลฃ was considered tolerable. ๐
๐ ISO/IEC 8859-3 (Latin-3) ๐
Latin-3 was designed to cover Esperanto, Maltese, and Turkish, but ISO/IEC 8859-9 later superseded it for Turkish. Not the main character anymore, but okay. โจ
๐ฆ ISO/IEC 8859-4 (Latin-4) ๐ฆ
Latin-4 introduced letters for North European languages such as Estonian, Latvian, and Lithuanian, but was superseded by ISO/IEC 8859-10 and ISO/IEC 8859-13. ๐ซ
โจ ISO/IEC 8859-5 โจ
Cyrillic letters supporting Bulgarian, Byelorussian, Macedonian, Russian, Serbian, and (almost completely) Ukrainian. It was never widely used, see the discussion of KOI8-R/KOI8-U below. ๐
๐ ISO/IEC 8859-6 ๐
Was created for Arabic. The ISO/IEC 8859-6 glyph table is a fixed font of separate letter forms, but a proper display engine should combine these using the proper initial, medial, and final forms. ๐ซถ
๐ ISO/IEC 8859-7 ๐
Was created for Modern Greek in 1987, updated in 2003. Periodt.
๐ ISO/IEC 8859-8 ๐
Supports Modern Hebrew without niqud (punctuation signs). Niqud and full-fledged Biblical Hebrew were outside the scope of this character set. ๐
๐ ISO/IEC 8859-9 (Latin-5) ๐
This is a variant of Latin-1 that replaces Icelandic letters with Turkish ones. Iconic swap, honestly.
๐ง ISO/IEC 8859-10 (Latin-6) ๐ง
Latin-6 added the Inuit (Greenlandic) and Sami (Lappish) letters that were missing in Latin-4 to cover the entire Nordic area. โ๏ธ
โญ ISO/IEC 8859-11 โญ
Supports the Thai alphabet and is nearly identical to the TIS-620 standard. โจ
๐ ISO/IEC 8859-12 ๐
This character set does not exist. Not even a vibe. It's giving void. ๐ณ๏ธ
๐ ISO/IEC 8859-13 (Latin-7) ๐
Supports the Baltic Rim languages; in particular, it includes Latvian characters not found in Latin-4. ๐
๐ ISO/IEC 8859-14 (Latin-8) ๐
This is the Celtic character set, covering Old Irish, Manx, Gaelic, Welsh, Cornish, and Breton. ๐
๐ ISO/IEC 8859-15 (Latin-9) ๐
Latin-9 is similar to the widely used Latin-1 but replaces some less common symbols with the Euro sign and French and Finnish letters that were missing in Latin-1. ๐ถ
๐งก ISO/IEC 8859-16 (Latin-10) ๐งก
This character set covers many Southeast European languages, and most importantly supports Romanian more completely than Latin-2. ๐
๐ KOI8-R / KOI8-U ๐
KOI8-R is a non-ISO character set popular in Russia before Unicode. The lower half is ASCII; the upper is a Cyrillic character set somewhat better designed than ISO/IEC 8859-5. KOI8-U, based on KOI8-R, has better support for Ukrainian. Neither of these sets are ISO/IEC 2022 compatible, unlike the ISO/IEC 8859 series. ๐ซ
Console support for KOI8-R is available under Linux through user-mode utilities that modify keyboard bindings and the EGA graphics table, and employ the "user mapping" font table in the console driver. ๐
๐ GB 2312 ๐
GB 2312 is a mainland Chinese national standard character set used to express simplified Chinese. Just like JIS X 0208, characters are mapped into a 94x94 two-byte matrix used to construct EUC-CN. EUC-CN is the most important encoding for Linux and includes ASCII and GB 2312. Note that EUC-CN is often called as GB, GB 2312, or CN-GB. ๐
๐ก Big5 ๐ก
Big5 was a popular character set in Taiwan to express traditional Chinese. (Big5 is both a character set and an encoding.) It is a superset of ASCII. Non-ASCII characters are expressed in two bytes. Bytes 0xa1โ0xfe are used as leading bytes for two-byte characters. Big5 and its extension were widely used in Taiwan and Hong Kong. It is not ISO/IEC 2022 compliant. ๐
๐ JIS X 0208 ๐
JIS X 0208 is a Japanese national standard character set. Though there are some more Japanese national standard character sets (like JIS X 0201, JIS X 0212, and JIS X 0213), this is the most important one. Characters are mapped into a 94x94 two-byte matrix, whose each byte is in the range 0x21โ0x7e. Note that JIS X 0208 is a character set, not an encoding. This means that JIS X 0208 itself is not used for expressing text data. JIS X 0208 is used as a component to construct encodings such as EUC-JP, Shift_JIS, and ISO/IEC 2022-JP. EUC-JP is the most important encoding for Linux and includes ASCII and JIS X 0208. In EUC-JP, JIS X 0208 characters are expressed in two bytes, each of which is the JIS X 0208 code plus 0x80. ๐ฅ
๐ฐ๐ท KS X 1001 ๐ฐ๐ท
KS X 1001 is a Korean national standard character set. Just as JIS X 0208, characters are mapped into a 94x94 two-byte matrix. KS X 1001 is used like JIS X 0208, as a component to construct encodings such as EUC-KR, Johab, and ISO/IEC 2022-KR. EUC-KR is the most important encoding for Linux and includes ASCII and KS X 1001. KS C 5601 is an older name for KS X 1001. โจ
๐งฌ ISO/IEC 2022 and ISO/IEC 4873 ๐งฌ
The ISO/IEC 2022 and ISO/IEC 4873 standards describe a font-control model based on VT100 practice. This model is (partially) supported by the Linux kernel and by xterm(1). Several ISO/IEC 2022-based character encodings have been defined, especially for Japanese. ๐
There are 4 graphic character sets, called G0, G1, G2, and G3, and one of them is the current character set for codes with high bit zero (initially G0), and one of them is the current character set for codes with high bit one (initially G1). Each graphic character set has 94 or 96 characters, and is essentially a 7-bit character set. It uses codes either 040โ0177 (041โ0176) or 0240โ0377 (0241โ0376). G0 always has size 94 and uses codes 041โ0176. ๐
Switching between character sets is done using the shift functions ^N (SO or LS1), ^O (SI or LS0), ESC n (LS2), ESC o (LS3), ESC N (SS2), ESC O (SS3), ESC ~ (LS1R), ESC } (LS2R), ESC | (LS3R). The function LSn makes character set Gn the current one for codes with high bit zero. The function LSnR makes character set Gn the current one for codes with high bit one. The function SSn makes character set Gn (n=2 or 3) the current one for the next character only (regardless of the value of its high order bit). ๐
A 94-character set is designated as Gn character set by an escape sequence ESC ( xx (for G0), ESC ) xx (for G1), ESC * xx (for G2), ESC + xx (for G3), where xx is a symbol or a pair of symbols found in the ISO/IEC 2375 International Register of Coded Character Sets. For example, ESC ( @ selects the ISO/IEC 646 character set as G0, ESC ( A selects the UK standard character set (with pound instead of number sign), ESC ( B selects ASCII (with dollar instead of currency sign), ESC ( M selects a character set for African languages, ESC ( ! A selects the Cuban character set, and so on. ๐คฏ
A 96-character set is designated as Gn character set by an escape sequence ESC - xx (for G1), ESC . xx (for G2) or ESC / xx (for G3). For example, ESC - G selects the Hebrew alphabet as G1. ๐ธ
A multibyte character set is designated as Gn character set by an escape sequence ESC $ xx or ESC $ ( xx (for G0), ESC $ ) xx (for G1), ESC $ * xx (for G2), ESC $ + xx (for G3). For example, ESC $ ( C selects the Korean character set for G0. The Japanese character set selected by ESC $ B has a more recent version selected by ESC & @ ESC $ B. ๐
ISO/IEC 4873 stipulates a narrower use of character sets, where G0 is fixed (always ASCII), so that G1, G2, and G3 can be invoked only for codes with the high order bit set. In particular, ^N and ^O are not used anymore, ESC ( xx can be used only with xx=B, and ESC ) xx, ESC * xx, ESC + xx are equivalent to ESC - xx, ESC . xx, ESC / xx, respectively. Periodt. ๐
๐บ TIS-620 ๐บ
TIS-620 is a Thai national standard character set and a superset of ASCII. In the same fashion as the ISO/IEC 8859 series, Thai characters are mapped into 0xa1โ0xfe. ๐
๐ Unicode ๐
okay bestie, deep breath, this is the big one. Unicode (it's also ISO/IEC 10646 โ same standard, they're besties) is a standard whose whole goal is to unambiguously represent every character in every human language. Every single one. No exclusivity here. And the structure of Unicode has room for 20.1 bits to encode each and every character.
But here's the situation: most computers do not have 20.1-bit integers just chillin' in them (rude, honestly). So Unicode is usually encoded as 32-bit integers internally, and then either as a series of 16-bit integers (UTF-16) โ and note that one only needs two 16-bit integers when it's encoding certain rare characters โ or as a series of 8-bit bytes, which is UTF-8.
Linux does Unicode using the 8-bit Unicode Transformation Format, aka UTF-8. And UTF-8 is a variable length encoding of Unicode, she flexes like this:
1byte to code7bits2bytes for11bits3bytes for16bits4bytes for21bits5bytes for26bits6bytes for31bits
So let 0, 1 and x mean a zero, a one, or literally any arbitrary bit โจ. A byte like 0xxxxxxx stands for the Unicode 00000000 0xxxxxxx, and that codes the exact same symbol as the ASCII 0xxxxxxx. Which means โ plot twist โ ASCII goes into UTF-8 completely unchanged, and if all you use is ASCII you will not notice a single thing. Not in code, not in file size. Nothing. Not me being dramatic, it's just true ๐ซถ.
A byte 110xxxxx is the head of a 2-byte code, and 110xxxxx 10yyyyyy gets assembled into 00000xxx xxyyyyyy. Meanwhile a byte 1110xxxx is the head of a 3-byte code, and 1110xxxx 10yyyyyy 10zzzzzz gets assembled into xxxxyyyy yyzzzzzz. (And when UTF-8 is out here coding the 31-bit ISO/IEC 10646, this progression just keeps going, all the way up to 6-byte codes.)
For most texts in ISO/IEC 8859 character sets, this means the characters outside of ASCII are now coded with two bytes. Sounds like a lot, but it only tends to expand ordinary text files by one or two percent โ nothing. For Russian or Greek texts though? That expands ordinary text files by 100%, because text in those languages is mostly outside of ASCII. And for Japanese users it means the 16-bit codes that are now in common use will take three bytes. The way that conversion costs are just eating? ๐ญ
And yes, there are algorithmic conversions from some character sets (especially ISO/IEC 8859-1) to Unicode, but general conversion requires carrying around conversion tables โ and for 16-bit codes those can be quite large. So. There's that.
Also note, because it's iconic: UTF-8 is self-synchronizing. 10xxxxxx is a tail, and any other byte is the head of a code. And the only way ASCII bytes occur in a UTF-8 stream is as themselves โ no sneaky cameos, no plot twists. In particular, there are no embedded NULs ('\0') or '/'s that form part of some larger code.
Since ASCII โ and in particular NUL and '/' โ are unchanged, the kernel does not notice at all that UTF-8 is being used. It genuinely does not care what the bytes it's handling stand for. King shit, honestly ๐.
Rendering of Unicode data streams is typically handled through "subfont" tables, which map a subset of Unicode to glyphs. Internally, the kernel uses Unicode to describe the subfont loaded in video RAM. Which means: in the Linux console in UTF-8 mode, you can use a character set with 512 different symbols ๐ธ.
That is not enough for Japanese, Chinese, and Korean. But it is enough for most other purposes. Balanced, as all things should be.
๐ SEE ALSO ๐
go read your sisters, bestie, they're all connected:
and that's the whole page, you made it!! ๐ this one came from Linux man-pages 6.20, dated 2026-02-08 โ so if you're quoting her, that's the vibe check timestamp. mwah, go touch some grass, then go read utf-8(7) ๐
โจ๐
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-2.0-or-later
- Copyright 1996, Eric S. Raymond <esr@thyrsus.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms