]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man7/charsets.7
Various pages: tfix (Oxford comma)
[thirdparty/man-pages.git] / man7 / charsets.7
index 214285aca7e6657c2c562f8edfaa97b13a1651b8..1e28ef361b30ca32da999bb697271370eb99502d 100644 (file)
@@ -1,4 +1,3 @@
-'\" t -*- coding: UTF-8 -*-
 .\" Copyright (c) 1996 Eric S. Raymond <esr@thyrsus.com>
 .\" and Copyright (c) Andries Brouwer <aeb@cwi.nl>
 .\"
 .\"
 .\" Changes also by David Starner <dstarner98@aasaa.ofe.org>.
 .\"
-.TH CHARSETS 7 2014-08-19 "Linux" "Linux Programmer's Manual"
+.TH CHARSETS 7 2020-08-13 "Linux" "Linux Programmer's Manual"
 .SH NAME
-charsets - character set standards and internationalization
+charsets \- character set standards and internationalization
 .SH DESCRIPTION
 This manual page gives an overview on different character set standards
 and how they were used on Linux before Unicode became ubiquitous.
 Some of this information is still helpful for people working with legacy
 systems and documents.
-.LP
+.PP
 Standards discussed include such as
 ASCII, GB 2312, ISO 8859, JIS, KOI8-R, KS, and Unicode.
-.LP
+.PP
 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.
@@ -35,7 +34,7 @@ ASCII (American Standard Code For Information Interchange) is the original
 Also known as US-ASCII.
 It is currently described by the ISO 646:1991 IRV
 (International Reference Version) standard.
-.LP
+.PP
 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
@@ -43,27 +42,27 @@ emerged.
 All are deprecated;
 glibc does not support locales whose character sets are not true
 supersets of ASCII.
-.LP
+.PP
 As Unicode, when using UTF-8, is ASCII-compatible, plain ASCII text
 still renders properly on modern UTF-8 using systems.
 .SS ISO 8859
 ISO 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.
-.LP
+128 to 159, and 96 fixed-width graphics in positions 160\(en255.
+.PP
 Of these, the most important is ISO 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 8859-1 characters are also the first 256 characters of Unicode.
-.LP
+.PP
 Console support for the other 8859 character sets is available under
 Linux through user-mode utilities (such as
 .BR setfont (8))
 that modify keyboard bindings and the EGA graphics
 table and employ the "user mapping" font table in the console
 driver.
-.LP
+.PP
 Here are brief descriptions of each set:
 .TP
 8859-1 (Latin-1)
@@ -145,8 +144,8 @@ the upper is a Cyrillic character set somewhat better designed than
 ISO 8859-5.
 KOI8-U, based on KOI8-R, has better support for Ukrainian.
 Neither of these sets are ISO-2022 compatible,
-unlike the ISO-8859 series.
-.LP
+unlike the ISO 8859 series.
+.PP
 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.
@@ -165,7 +164,7 @@ 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.
+Bytes 0xa1\(en0xfe 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 2022 compliant.
 .\" Thanks to Tomohiro KUBOTA for the following sections about
@@ -175,7 +174,7 @@ 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.
+whose each byte is in the range 0x21\(en0x7e.
 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.
@@ -204,7 +203,7 @@ by the Linux kernel and by
 .BR xterm (1).
 Several ISO 2022-based character encodings have been defined,
 especially for Japanese.
-.LP
+.PP
 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
@@ -212,12 +211,12 @@ 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.
-.LP
+040\(en0177 (041\(en0176) or 0240\(en0377 (0241\(en0376).
+G0 always has size 94 and uses codes 041\(en0176.
+.PP
 Switching between character sets is done using the shift functions
-\fB^N\fP (SO or LS1), \fB^O\fP (SI or LS0), ESC n (LS2), ESC o (LS3),
-ESC N (SS2), ESC O (SS3), ESC ~ (LS1R), ESC } (LS2R), ESC | (LS3R).
+\fB\(haN\fP (SO or LS1), \fB\(haO\fP (SI or LS0), ESC n (LS2), ESC o (LS3),
+ESC N (SS2), ESC O (SS3), ESC \(ti (LS1R), ESC } (LS2R), ESC | (LS3R).
 The function LS\fIn\fP makes character set G\fIn\fP the current one
 for codes with high bit zero.
 The function LS\fIn\fPR makes character set G\fIn\fP the current one
@@ -225,7 +224,7 @@ for codes with high bit one.
 The function SS\fIn\fP makes character set G\fIn\fP (\fIn\fP=2 or 3)
 the current one for the next character only (regardless of the value
 of its high order bit).
-.LP
+.PP
 A 94-character set is designated as G\fIn\fP 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
@@ -237,30 +236,30 @@ 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.
-.LP
+.PP
 A 96-character set is designated as G\fIn\fP 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.
-.LP
+.PP
 A multibyte character set is designated as G\fIn\fP 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.
-.LP
+.PP
 ISO 4873 stipulates a narrower use of character sets, where G0
-is fixed (always ASCII), so that G1, G2 and G3
+is fixed (always ASCII), so that G1, G2, and G3
 can be invoked only for codes with the high order bit set.
-In particular, \fB^N\fP and \fB^O\fP are not used anymore, ESC ( xx
+In particular, \fB\(haN\fP and \fB\(haO\fP 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.
 .SS TIS-620
 TIS-620 is a Thai national standard character set and a superset
 of ASCII.
 In the same fashion as the ISO 8859 series, Thai characters are mapped into
-0xa1-0xfe.
+0xa1\(en0xfe.
 .SS Unicode
 Unicode (ISO 10646) is a standard which aims to unambiguously represent
 every character in every human language.
@@ -269,14 +268,14 @@ Since most computers don't include 20.1-bit integers, Unicode is
 usually encoded as 32-bit integers internally and either a series of
 16-bit integers (UTF-16) (needing two 16-bit integers only when
 encoding certain rare characters) or a series of 8-bit bytes (UTF-8).
-.LP
+.PP
 Linux represents Unicode using the 8-bit Unicode Transformation Format
 (UTF-8).
 UTF-8 is a variable length encoding of Unicode.
 It uses 1
 byte to code 7 bits, 2 bytes for 11 bits, 3 bytes for 16 bits, 4 bytes
 for 21 bits, 5 bytes for 26 bits, 6 bytes for 31 bits.
-.LP
+.PP
 Let 0,1,x stand for a zero, one, or arbitrary bit.
 A byte 0xxxxxxx
 stands for the Unicode 00000000 0xxxxxxx which codes the same symbol
@@ -284,7 +283,7 @@ as the ASCII 0xxxxxxx.
 Thus, ASCII goes unchanged into UTF-8, and
 people using only ASCII do not notice any change: not in code, and not
 in file size.
-.LP
+.PP
 A byte 110xxxxx is the start of a 2-byte code, and 110xxxxx 10yyyyyy
 is assembled into 00000xxx xxyyyyyy.
 A byte 1110xxxx is the start
@@ -292,8 +291,8 @@ of a 3-byte code, and 1110xxxx 10yyyyyy 10zzzzzz is assembled
 into xxxxyyyy yyzzzzzz.
 (When UTF-8 is used to code the 31-bit ISO 10646
 then this progression continues up to 6-byte codes.)
-.LP
-For most texts in ISO-8859 character sets, this means that the
+.PP
+For most texts in ISO 8859 character sets, this means that the
 characters outside of ASCII are now coded with two bytes.
 This tends
 to expand ordinary text files by only one or two percent.
@@ -306,19 +305,19 @@ While there are algorithmic conversions from some character sets
 (especially ISO 8859-1) to Unicode, general conversion requires
 carrying around conversion tables, which can be quite large for 16-bit
 codes.
-.LP
+.PP
 Note that UTF-8 is self-synchronizing: 10xxxxxx is a tail, any other
 byte is the head of a code.
 Note that the only way ASCII bytes occur
 in a UTF-8 stream, is as themselves.
 In particular, there are no
-embedded NULs (\(aq\\0\(aq) or \(aq/\(aqs that form part of some larger code.
-.LP
+embedded NULs (\(aq\e0\(aq) or \(aq/\(aqs that form part of some larger code.
+.PP
 Since ASCII, and, in particular, NUL and \(aq/\(aq, are unchanged, the
 kernel does not notice that UTF-8 is being used.
 It does not care at
 all what the bytes it is handling stand for.
-.LP
+.PP
 Rendering of Unicode data streams is typically handled through
 "subfont" tables which map a subset of Unicode to glyphs.
 Internally
@@ -330,6 +329,6 @@ Korean, but it is enough for most other purposes.
 .SH SEE ALSO
 .BR iconv (1),
 .BR ascii (7),
-.BR iso_8859-1 (7),
+.BR iso_8859\-1 (7),
 .BR unicode (7),
-.BR utf-8 (7)
+.BR utf\-8 (7)