rfc1922.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,516 行 · 第 1/4 页
TXT
1,516 行
5) Japan:
ftp://etlport.etl.go.jp/pub/iso-2022-cn/convert/big5cns.zip
(IP address: 192.31.197.99)
Zhu, et al Informational [Page 7]
RFC 1922 Chinese Character Encoding March 1996
2. 8-bit Chinese encodings: CN-GB and CN-Big5
The CN-GB and CN-Big5 MIME charsets are defined below.
Note: the use of 8-bit character sets requires the use of either
an 8-to-7 Content-Transfer-Encoding mechanism such as "BASE64" or
"QUOTED-PRINTABLE" if the network is not 8-bit clean, or the 8-bit
SMTP extensions [SMTPEXT] with the "8BIT"
Content-Transfer-Encoding on 8-bit clean networks. Otherwise, an
8-bit message that passes through a 7-bit mailer is likely to have
the 8th bit truncated, resulting in an unreadable message.
Although "just send 8-bit data" has been common practice in the
past, it is incorrect according to the Internet standards and
causes interoperability problems.
2.1. CN-GB
E-mail using CN-GB characters is sent in this way:
GB 2312-80 characters are used with ASCII characters, not GB 1988-89
[GB-1988].
GB 2312-80 is also 7-bit, to avoid conflicting with ASCII. If the
character is from GB 2312-80, the MSB (bit-8) of each byte is set to
1, and therefore becomes a 8-bit character. Otherwise, the byte is
interpreted as ASCII. This constructs a character set named "GB
Internal Code".
This method is also adopted in the .gb files in the Internet.
To use this character scheme with MIME, CN-GB is used as the value
for the charset parameter:
Content-Type: text/plain; charset=cn-gb; charset-edition=1980
Note: The "charset-edition" is a new MIME parameter described in
section 4.1 of the "Specification" part of this document.
GB 12345-90 is the traditional form of GB 2312, the charset name
given to this set is CN-GB-12345 with the charset-edition of 1990.
There are also character sets that can only be used with other GB
sets. For example, GB 8565-88 [GB-8565] is used with GB 2312 and
some other characters to form the ISO-IR-165 set (also known as GB
2312 + GB 8565.2). ISO-IR-165 contains all characters from GB
2312-80 as revised by GB 6345.1-86 and GB 8565.2-88. Its MIME
charset name is CN-GB-ISOIR165 with the charset-edition of 1992.
Zhu, et al Informational [Page 8]
RFC 1922 Chinese Character Encoding March 1996
CN-GB-12345 and CN-GB-ISOIR165 support ASCII in a similar manner to
CN-GB; the MSB of Chinese characters is set to 1 to distinguish from
ASCII.
Note: There are some supplementary character sets in GB, i.e. GB
7589-87, GB 7590-87, GB 13131-91 and GB 13132-91. Normally, they
won't be used independently without using GB-2312 or GB-12345, so
they are not necessarily to be registered. Characters in these
standards could be supported with ISO-2022-CN and ISO-2022-CN-EXT.
If, in the future, they need to be used with "charset" names, it
is the responsibility of any interested third party (the
standardization organization or anybody else) to write the
necessary documents and register the charset with the IANA. It is
encouraged that the charset names take the form of CN-GB-<number>,
such as CN-GB-12345, where <number> is the GB standard number. A
charset-edition should also be given. All CN-GB-<number> sets
should be coded in 8-bit in a similar fashion to CN-GB.
To ensure interoperability, the CN-GB charset should be used whenever
possible instead of a CN-GB-<number> charset.
2.2. CN-Big5
Big5 is a two-byte character set of traditional Chinese characters,
widely used in Taiwan and overseas. E-mail of CN-Big5 is sent in
this way:
Big5 is used with ASCII. The MSB of ASCII characters is always 0.
The MSB of the first byte of a Big5 character is always 1; this
distinguishes it from an ASCII character. The second byte has 8
significant bits. Therefore, CN-Big5 is an 8-bit encoding with a
15-bit codespace.
To use this character scheme with MIME, CN-Big5 is used as the value
for the charset parameter:
Content-Type: text/plain; charset=cn-big5; charset-edition=1984
Note: The "charset-edition" is a new MIME parameter described in
section 4.1 of the "Specification" part of this document.
3. Universal Multilingual Character Set: ISO/IEC-10646/Unicode
ISO/IEC 10646 defines a 32bit character space with the intent to
encode all characters in the world. Currently, only the lowest 16bit
plane of ISO 10646, the Basic Multilingual Plane (BMP), is defined.
The BMP is code-by-code identical to Unicode [Unicode 1.1]. it
contains a large repertoire of Chinese characters (it currently
Zhu, et al Informational [Page 9]
RFC 1922 Chinese Character Encoding March 1996
includes all the characters of GB 2312-80, GB 12345-90, GB 8565-89,
CNS 11643's plane 1 and 2, and part of some other standards) and
therefore can be used to transport Chinese characters in the Internet
community. This document does not give any details on how to do
this, as this has been done elsewhere. For details of using Unicode
with MIME, refer to RFC 1641 [RFC-1641], RFC 1642 [RFC-1642]. For
assigned names for 10646 set, refer to STD 2--"Assigned Numbers",
which is RFC 1700 [RFC-1700] currently. For more up-to-date assigned
numbers, please check:
ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
4. Two New MIME parameters
Here we define two new MIME parameters to be used with "charset"
parameters.
4.1. "charset-edition"
This parameter is used after the MIME "charset" parameter, using four
digits (AD) to indicate what the year of edition is for the character
set standard shown in "charset". Its use is optional.
Implementations should ignore this parameter unless the
implementation has specific support for that particular character set
edition.
The reason for defining this parameter is that there are often
differences in the defined characters between editions of a character
set standard. Sometimes, the difference can not be ignored,
otherwise implementations would have problems when processing it.
There are only two ways to indicate this difference, in the current
MIME syntax. One way is to indicate the edition in the charset name,
such as CN-GB-1988-80 (the 1980's edition of GB 1988). The other way
is to define a new optional parameter such as "charset-edition". The
latter way is better because receiving applications that can only
process an older edition can still recognize the character set and
offer to display the text in the older edition. This display may
have a few mistakes, but it is better than refusing to display any
text at all or defaulting to an inappropriate character set such as
US-ASCII or ISO-8859-1.
4.2. "charset-extension"
This parameter is also used after the MIME "charset" parameter. It
is case-insensitive and optional, and any value of this parameter
should be registered in IANA. Unregistered value should start with
"x-" as with any MIME extension-token. Implementations should ignore
this parameter unless the implementation has specific support for
Zhu, et al Informational [Page 10]
RFC 1922 Chinese Character Encoding March 1996
that particular character set extension.
A character set extension has displayed glyphs for code points that
are not assigned in the character set, for example, vendor-specific
extensions of standard character sets. This parameter provides the
option of using these extensions. Although character set extensions
may cause interoperability problems, we recognize the existence of
such extensions.
For example:
Content-Type: text/plain; charset=CN-Big5; charset-edition=1984;
charset-extension=ETen-2.00.03-DOS
This may indicate Eten company's extension of Big5: ETen 2.00.03 for
DOS, assuming that "ETen-2.00.03-DOS" is registered with the IANA..
4.3. Formal Syntax:
The following changes and additions are made to the MIME syntax:
charset-edition := "charset-edition" "=" 4DIGIT
; year of edition in four digits
charset-extension := "charset-extension" "=" extension-token
5. Background Information
5.1. Writing systems and their encodings in Chinese-speaking nations and
regions
The mainland provinces of China use simplified Chinese character in
daily life. GB is the standard electronic character set. It is the
main means for communications between people who share simplified
Chinese characters in the world.
Taiwan uses traditional Chinese characters in daily life. CNS-11643
is the formal character set for information interchange in Taiwan;
however, Big5, a widely-used character set of traditional Chinese
characters, is the de-facto internal code standard in Taiwan.
Hong Kong uses traditional Chinese characters in daily life, but uses
both GB and Big5 in electronic form, because Hong Kong people often
communicate with people in all of China's provinces.
Singapore seldom uses Chinese characters, and uses the simplified
form when Chinese characters are used. In electronic form, Unicode
is more popular, however GB is also used.
Zhu, et al Informational [Page 11]
RFC 1922 Chinese Character Encoding March 1996
5.2. Miscellaneous information about Chinese character sets
The GB 1988-89 character set is identical to ISO 646 [ISO-646] except
for currency symbol and tilde. The currency symbol and the tilde are
replaced by the Yuan sign and the overline. This set is GB's variant
of ISO 646. This character set and CNS 5205 [CNS-5205] are not
encouraged for use in the Internet, since ASCII combined with GB 2312
or CNS 11643-plane 1 and plane 2 contains all the characters in them.
The GB 2312-80 character set consists of simplified Chinese
characters, digits, and the Latin, Greek and Russian alphabets, and
some other symbols; in all, 7445 characters. Each character is
represented with two bytes.
GB 13000-95 [GB-13000] is GB's variant of ISO 10646. However, for
interoperability in the Internet, assigned names for ISO 10646 are
encouraged instead.
Currently both sides of the Taiwan Straits are cooperating closely in
promoting the use of ISO 10646's BMP and in continuing its
development together with other organizations under ISO.
5.3. Miscellaneous implementation information
For maximum interoperability, implementations SHOULD at least support
sending and receiving ISO-2022-CN. Supporting all registered
character sets in ISO-2022-CN-EXT is greatly encouraged.
To meet the current usage, support of CN-GB (the status quo for
simplified Chinese e-mail ) or CN-Big5 (the status quo for
traditional Chinese e-mail) may be necessary. However, it is not
reliable to send documents directly with these internal codes,
therefore sending ISO-2022-CN message is always encouraged whenever
possible.
To the maximum extent possible, implementations should be capable of
receiving messages in any of the encodings described in this
document, even if they only transmit messages in one form.
Preferably the implementation should display the characters with
glyphs appropriate to the typographic tradition that is implied in
the encoding of the received text. Implementation may also translate
these encodings to the encoding that its platform supports.
The human user (not implementor) should try to keep lines within 80
display columns, or, preferably, within 75 (or so) columns, to allow
insertion of ">" at the beginning of each line in excerpts. Each
Chinese character takes up two columns, and the shift sequences do
Zhu, et al Informational [Page 12]
RFC 1922 Chinese Character Encoding March 1996
not take up any columns. The implementor is reminded that Chinese
characters take up two bytes and should not be split in the middle to
break lines for displaying, etc.
Freely available fonts of Chinese characters:
Beijing:
ftp://ftp.net.tsinghua.edu.cn/pub/Chinese/fonts/
Xi'an:
ftp://ftp.xanet.edu.cn/pub/chinese-soft/fonts/
Taiwan:
ftp://ftp.edu.tw/Chinese/ifcss/software/fonts/
ftp://ftp.ntu.edu.tw/Chinese/ifcss/software/fonts/
Hong Kong:
ftp://ftp.cuhk.hk/pub/chinese/ifcss/software/fonts/
Singapore:
ftp://ftp.technet.sg:/pub/chinese/fonts/
US:
ftp://ftp.ifcss.org/pub/software/fonts/
http://ccic.ifcss.org/www/pub/software/fonts/
6. X.400 Considerations
X.400 has the ability of carrying different character sets in a
message by using the body part "GeneralText" defined by
ISO/IEC-10021-7 [ISO-10021].
The X.400 ASN.1 definition of the GeneralText body part is:
general-text-body-part EXTENDED-BODY-PART-TYPE
PARAMETERS GeneralTextParameters IDENTIFIED BY id-ep-general-text
DATA GeneralTextData
::= id-et-general-text
GeneralTextParameters ::= SET OF CharacterSetRegistration
CharacterSetRegistration ::= INTEGER (1..32767)
GeneralTextData ::= GeneralString
Therefore, to use ISO-2022-CN, set the "CharacterSetRegistration"
part as { 6 58 171 172 }, and add an ESC sequence of ESC ( B (three
bytes, hexadecimal values: 1B 28 42) before the beginning of each
Zhu, et al Informational [Page 13]
RFC 1922 Chinese Character Encoding March 1996
line of ISO-2022-CN text.
Similarly, to use ISO-2022-CN-EXT, set the registered numbers of all
character sets in the "CharacterSetRegistration" part and add ESC ( B
at the beginning of each line. For the registered numbers, please
refer to ISO registry. In addition to the character sets supported
by ISO-2022-CN, currently registered numbers are:
ISO IR 165 (GB 2312+GB 8565.2): 165
CNS 11643-plane 3: 183
CNS 11643-plane 4: 184
CNS 11643-plane 5: 185
CNS 11643-plane 6: 186
CNS 11643-plane 7: 187
176 is the registered number for the BASESET of ISO/IEC 10646-1:1993
UCS-2 with implementation level 3, Escape sequence of ESC % / E (four
bytes, hexadecimal values 1B 25 2F 45) indicates starting of this
codeset.
For CN-GB and CN-Big5 character sets, there are no formal methods
that could be used in X.400 yet.
For detail about X.400 use of character sets, please refer to RFC
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?