Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/man/2perl/Encode::Supported

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  | will give a
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "SUPPORTED 1"
.TH SUPPORTED 1 "2002-11-24" "perl v5.8.0" "Perl Programmers Reference Guide"
.SH "NAME"
Encode::Supported \-\- Encodings supported by Encode
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
.Sh "Encoding Names"
.IX Subsection "Encoding Names"
Encoding names are case insensitive. White space in names
is ignored.  In addition, an encoding may have aliases.
Each encoding has one \*(L"canonical\*(R" name.  The \*(L"canonical\*(R"
name is chosen from the names of the encoding by picking
the first in the following sequence (with a few exceptions).
.IP "\(bu" 4
The name used by the Perl community.  That includes 'utf8' and 'ascii'.
Unlike aliases, canonical names directly reach the method so such
frequently used words like 'utf8' don't need to do alias lookups.
.IP "\(bu" 4
The \s-1MIME\s0 name as defined in \s-1IETF\s0 RFCs.  This includes all \*(L"iso\-\*(R"s.
.IP "\(bu" 4
The name in the \s-1IANA\s0 registry.
.IP "\(bu" 4
The name used by the organization that defined it.
.PP
In case \fIde jure\fR canonical names differ from that of the Encode
module, they are always aliased if it ever be implemented.  So you can
safely tell if a given encoding is implemented or not just by passing 
the canonical name.
.PP
Because of all the alias issues, and because in the general case 
encodings have state, \*(L"Encode\*(R" uses an encoding object internally 
once an operation is in progress.
.SH "Supported Encodings"
.IX Header "Supported Encodings"
As of Perl 5.8.0, at least the following encodings are recognized.
Note that unless otherwise specified, they are all case insensitive
(via alias) and all occurrence of spaces are replaced with '\-'.
In other words, \*(L"\s-1ISO\s0 8859 1\*(R" and \*(L"iso\-8859\-1\*(R" are identical.
.PP
Encodings are categorized and implemented in several different modules
but you don't have to \f(CW\*(C`use Encode::XX\*(C'\fR to make them available for
most cases.  Encode.pm will automatically load those modules on demand.
.Sh "Built-in Encodings"
.IX Subsection "Built-in Encodings"
The following encodings are always available.
.PP
.Vb 8
\&  Canonical     Aliases                      Comments & References
\&  ----------------------------------------------------------------
\&  ascii         US-ascii ISO-646-US                         [ECMA]
\&  ascii-ctrl                                      Special Encoding
\&  iso-8859-1    latin1                                       [ISO]
\&  null                                            Special Encoding
\&  utf8          UTF-8                                    [RFC2279]
\&  ----------------------------------------------------------------
.Ve
.PP
\&\fInull\fR and \fIascii-ctrl\fR are special.  \*(L"null\*(R" fails for all character
so when you set fallback mode to \s-1PERLQQ\s0, \s-1HTMLCREF\s0 or \s-1XMLCREF\s0, \s-1ALL\s0
\&\s-1CHARACTERS\s0 will fall back to character references.  Ditto for
\&\*(L"ascii\-ctrl\*(R" except for control characters.  For fallback modes, see
Encode.
.Sh "Encode::Unicode \*(-- other Unicode encodings"
.IX Subsection "Encode::Unicode  other Unicode encodings"
Unicode coding schemes other than native utf8 are supported by
Encode::Unicode, which will be autoloaded on demand.
.PP
.Vb 10
\&  ----------------------------------------------------------------
\&  UCS-2BE       UCS-2, iso-10646-1                      [IANA, UC]
\&  UCS-2LE                                                     [UC]
\&  UTF-16                                                      [UC]
\&  UTF-16BE                                                    [UC]
\&  UTF-16LE                                                    [UC]
\&  UTF-32                                                      [UC]
\&  UTF-32BE      UCS-4                                         [UC]
\&  UTF-32LE                                                    [UC]
\&  ----------------------------------------------------------------
.Ve
.PP
To find how (UCS\-2|UTF\-(16|32))(LE|BE)? differ from one another,
see Encode::Unicode. 
.Sh "Encode::Byte \*(-- Extended \s-1ASCII\s0"
.IX Subsection "Encode::Byte  Extended ASCII"
Encode::Byte implements most single-byte encodings except for
Symbols and \s-1EBCDIC\s0. The following encodings are based on single-byte
encodings implemented as extended \s-1ASCII\s0.  Most of them map
\&\ex80\-\exff (upper half) to non-ASCII characters.
.IP "\s-1ISO\-8859\s0 and corresponding vendor mappings" 4
.IX Item "ISO-8859 and corresponding vendor mappings"
Since there are so many, they are presented in table format with
languages and corresponding encoding names by vendors.  Note that
the table is sorted in order of \s-1ISO\-8859\s0 and the corresponding vendor
mappings are slightly different from that of \s-1ISO\s0.  See
<http://czyborra.com/charsets/iso8859.html> for details.
.Sp
.Vb 32
\&  Lang/Regions  ISO/Other Std.  DOS     Windows Macintosh  Others
\&  ----------------------------------------------------------------
\&  N. America    (ASCII)         cp437        AdobeStandardEncoding
\&                                cp863 (DOSCanadaF)
\&  W. Europe     iso-8859-1      cp850   cp1252  MacRoman  nextstep
\&                                                         hp-roman8
\&                                cp860 (DOSPortuguese)
\&  Cntrl. Europe iso-8859-2      cp852   cp1250  MacCentralEurRoman
\&                                                MacCroatian
\&                                                MacRomanian
\&                                                MacRumanian
\&  Latin3 [1]    iso-8859-3      
\&  Latin4 [2]    iso-8859-4              
\&  Cyrillics     iso-8859-5      cp855   cp1251  MacCyrillic
\&    (See also next section)     cp866           MacUkrainian
\&  Arabic        iso-8859-6      cp864   cp1256  MacArabic
\&                                cp1006          MacFarsi
\&  Greek         iso-8859-7      cp737   cp1253  MacGreek
\&                                cp869 (DOSGreek2)
\&  Hebrew        iso-8859-8      cp862   cp1255  MacHebrew
\&  Turkish       iso-8859-9      cp857   cp1254  MacTurkish
\&  Nordics       iso-8859-10     cp865
\&                                cp861           MacIcelandic
\&                                                MacSami
\&  Thai          iso-8859-11 [3] cp874           MacThai
\&  (iso-8859-12 is nonexistent. Reserved for Indics?)
\&  Baltics       iso-8859-13     cp775           cp1257
\&  Celtics       iso-8859-14
\&  Latin9 [4]    iso-8859-15
\&  Latin10       iso-8859-16
\&  Vietnamese    viscii                  cp1258  MacVietnamese
\&  ----------------------------------------------------------------
.Ve
.Sp
.Vb 5
\&  [1] Esperanto, Maltese, and Turkish. Turkish is now on 8859-9.
\&  [2] Baltics.  Now on 8859-10, except for Latvian.
\&  [3] Also know as TIS 620. 
\&  [4] Nicknamed Latin0; the Euro sign as well as French and Finnish
\&      letters that are missing from 8859-1 were added.
.Ve
.Sp
All cp* are also available as ibm\-*, ms\-*, and windows\-* .  See also
<http://czyborra.com/charsets/codepages.html>.
.Sp
Macintosh encodings don't seem to be registered in such entities as
\&\s-1IANA\s0.  \*(L"Canonical\*(R" names in Encode are based upon Apple's Tech Note
1150.  See <http://developer.apple.com/technotes/tn/tn1150.html> 
for details.
.IP "\s-1KOI8\s0 \- De Facto Standard for the Cyrillic world" 4
.IX Item "KOI8 - De Facto Standard for the Cyrillic world"
Though \s-1ISO\-8859\s0 does have \s-1ISO\-8859\-5\s0, the \s-1KOI8\s0 series is far more
popular in the Net.   Encode comes with the following \s-1KOI\s0 charsets.
For gory details, see <http://czyborra.com/charsets/cyrillic.html>
.Sp
.Vb 5
\&  ----------------------------------------------------------------
\&  koi8-f                                        
\&  koi8-r cp878                                           [RFC1489]
\&  koi8-u                                                 [RFC2319]
\&  ----------------------------------------------------------------
.Ve
.IP "gsm0338 \- Hentai Latin 1" 4
.IX Item "gsm0338 - Hentai Latin 1"
\&\s-1GSM0338\s0 is for \s-1GSM\s0 handsets. Though it shares alphanumerals with
\&\s-1ASCII\s0, control character ranges and other parts are mapped very
differently, presumably to store Greek and Cyrillic alphabets.
This is also covered in Encode::Byte even though it is not an
\&\*(L"extended \s-1ASCII\s0\*(R" encoding.
.Sh "\s-1CJK:\s0 Chinese, Japanese, Korean (Multibyte)"
.IX Subsection "CJK: Chinese, Japanese, Korean (Multibyte)"
Note that Vietnamese is listed above.  Also read \*(L"Encoding vs Charset\*(R"
below.  Also note that these are implemented in distinct modules by
countries, due the the size concerns (simplified Chinese is mapped
to '\s-1CN\s0', continental China, while traditional Chinese is mapped to
\&'\s-1TW\s0', Taiwan).  Please refer to their respective documentataion pages.
.IP "Encode::CN \*(-- Continental China" 4
.IX Item "Encode::CN  Continental China"
.Vb 9
\&  Standard      DOS/Win Macintosh                Comment/Reference
\&  ----------------------------------------------------------------
\&  euc-cn [1]            MacChineseSimp
\&  (gbk)         cp936 [2]
\&  gb12345-raw                      { GB12345 without CES }
\&  gb2312-raw                       { GB2312  without CES }
\&  hz
\&  iso-ir-165
\&  ----------------------------------------------------------------
.Ve
.Sp
.Vb 2
\&  [1] GB2312 is aliased to this.  See L<Microsoft-related naming mess>
\&  [2] gbk is aliased to this.  See L<Microsoft-related naming mess>
.Ve
.IP "Encode::JP \*(-- Japan" 4
.IX Item "Encode::JP  Japan"
.Vb 11
\&  Standard      DOS/Win Macintosh                Comment/Reference
\&  ----------------------------------------------------------------
\&  euc-jp
\&  shiftjis      cp932   macJapanese
\&  7bit-jis
\&  iso-2022-jp                                            [RFC1468]
\&  iso-2022-jp-1                                          [RFC2237]
\&  jis0201-raw  { JIS X 0201 (roman + halfwidth kana) without CES }
\&  jis0208-raw  { JIS X 0208 (Kanji + fullwidth kana) without CES }
\&  jis0212-raw  { JIS X 0212 (Extended Kanji)         without CES }
\&  ----------------------------------------------------------------
.Ve
.IP "Encode::KR \*(-- Korea" 4
.IX Item "Encode::KR  Korea"
.Vb 8
\&  Standard      DOS/Win Macintosh                Comment/Reference
\&  ----------------------------------------------------------------
\&  euc-kr                MacKorean                        [RFC1557]
\&                cp949 [1]                    
\&  iso-2022-kr                                            [RFC1557]
\&  johab                                  [KS X 1001:1998, Annex 3]
\&  ksc5601-raw                              { KSC5601 without CES }
\&  ----------------------------------------------------------------
.Ve
.Sp
.Vb 2
\&  [1] ks_c_5601-1987, (x-)?windows-949, and uhc are aliased to this.
\&  See below.
.Ve
.IP "Encode::TW \*(-- Taiwan" 4
.IX Item "Encode::TW  Taiwan"
.Vb 5
\&  Standard      DOS/Win Macintosh                Comment/Reference
\&  ----------------------------------------------------------------
\&  big5-eten     cp950   MacChineseTrad {big5 aliased to big5-eten}
\&  big5-hkscs                              
\&  ----------------------------------------------------------------
.Ve
.IP "Encode::HanExtra \*(-- More Chinese via \s-1CPAN\s0" 4
.IX Item "Encode::HanExtra  More Chinese via CPAN"
Due to size concerns, additional Chinese encodings below are
distributed separately on \s-1CPAN\s0, under the name Encode::HanExtra.
.Sp
.Vb 8
\&  Standard      DOS/Win Macintosh                Comment/Reference
\&  ----------------------------------------------------------------
\&  big5ext                                   CMEX's Big5e Extension
\&  big5plus                                  CMEX's Big5+ Extension
\&  cccii         Chinese Character Code for Information Interchange
\&  euc-tw                             EUC (Extended Unix Character)
\&  gb18030                          GBK with Traditional Characters
\&  ----------------------------------------------------------------
.Ve
.IP "Encode::JIS2K \*(-- \s-1JIS\s0 X 0213 encodings via \s-1CPAN\s0" 4
.IX Item "Encode::JIS2K  JIS X 0213 encodings via CPAN"
Due to size concerns, additional Japanese encodings below are
distributed separately on \s-1CPAN\s0, under the name Encode::JIS2K.
.Sp
.Vb 8
\&  Standard      DOS/Win Macintosh                Comment/Reference
\&  ----------------------------------------------------------------
\&  euc-jisx0213
\&  shiftjisx0123
\&  iso-2022-jp-3
\&  jis0213-1-raw
\&  jis0213-2-raw
\&  ----------------------------------------------------------------
.Ve
.Sh "Miscellaneous encodings"
.IX Subsection "Miscellaneous encodings"
.IP "Encode::EBCDIC" 4
.IX Item "Encode::EBCDIC"
See perlebcdic for details.
.Sp
.Vb 8
\&  ----------------------------------------------------------------
\&  cp37
\&  cp500  
\&  cp875  
\&  cp1026  
\&  cp1047  
\&  posix-bc
\&  ----------------------------------------------------------------
.Ve
.IP "Encode::Symbols" 4
.IX Item "Encode::Symbols"
For symbols  and dingbats.
.Sp
.Vb 7
\&  ----------------------------------------------------------------
\&  symbol
\&  dingbats
\&  MacDingbats
\&  AdobeZdingbat
\&  AdobeSymbol
\&  ----------------------------------------------------------------
.Ve
.IP "Encode::MIME::Header" 4
.IX Item "Encode::MIME::Header"
Strictly speaking, \s-1MIME\s0 header encoding documented in \s-1RFC\s0 2047 is more
of encapsulation than encoding.  But included anyway.
.Sp
.Vb 5
\&  ----------------------------------------------------------------
\&  MIME-Header                                            [RFC2047]
\&  MIME-B                                                 [RFC2047]
\&  MIME-Q                                                 [RFC2047]
\&  ----------------------------------------------------------------
.Ve
.IP "Encode::Guess" 4
.IX Item "Encode::Guess"
This one is not a name of encoding but a utility that lets you pick up
the most appropriate encoding for a data out of given \fIsuspects\fR.  See
Encode::Guess for details.
.SH "Unsupported encodings"
.IX Header "Unsupported encodings"
The following encodings are not supported as yet; some because they
are rarely used, some because of technical difficulties.  They may
be supported by external modules via \s-1CPAN\s0 in the future, however.
.IP "\s-1ISO\-2022\-JP\-2\s0 [\s-1RFC1554\s0]" 4
.IX Item "ISO-2022-JP-2 [RFC1554]"
Not very popular yet.  Needs Unicode Database or equivalent to
implement \fIencode()\fR (because it includes \s-1JIS\s0 X 0208/0212, \s-1KSC5601\s0, and
\&\s-1GB2312\s0 simultaneously, whose code points in Unicode overlap.  So you
need to lookup the database to determine to what character set a given
Unicode character should belong). 
.IP "\s-1ISO\-2022\-CN\s0 [\s-1RFC1922\s0]" 4
.IX Item "ISO-2022-CN [RFC1922]"
Not very popular.  Needs \s-1CNS\s0 11643\-1 and \-2 which are not available in
this module.  \s-1CNS\s0 11643 is supported (via euc\-tw) in Encode::HanExtra.
Autrijus Tang may add support for this encoding in his module in future.
.IP "Various HP-UX encodings" 4
.IX Item "Various HP-UX encodings"
The following are unsupported due to the lack of mapping data.
.Sp
.Vb 2
\&  '8'  - arabic8, greek8, hebrew8, kana8, thai8, and turkish8
\&  '15' - japanese15, korean15, and roi15
.Ve
.IP "Cyrillic encoding \s-1ISO\-IR\-111\s0" 4
.IX Item "Cyrillic encoding ISO-IR-111"
Anton Tagunov doubts its usefulness.
.IP "\s-1ISO\-8859\-8\-1\s0 [Hebrew]" 4
.IX Item "ISO-8859-8-1 [Hebrew]"
None of the Encode team knows Hebrew enough (\s-1ISO\-8859\-8\s0, cp1255 and
MacHebrew are supported because and just because there were mappings
available at <http://www.unicode.org/>).  Contributions welcome.
.IP "\s-1ISIRI\s0 3342, Iran System, \s-1ISIRI\s0 2900 [Farsi]" 4
.IX Item "ISIRI 3342, Iran System, ISIRI 2900 [Farsi]"
Ditto.
.IP "Thai encoding \s-1TCVN\s0" 4
.IX Item "Thai encoding TCVN"
Ditto.
.IP "Vietnamese encodings \s-1VPS\s0" 4
.IX Item "Vietnamese encodings VPS"
Though Jungshik Shin has reported that Mozilla supports this encoding,
it was too late before 5.8.0 for us to add it.  In the future, it
may be available via a separate module.  See
<http://lxr.mozilla.org/seamonkey/source/intl/uconv/ucvlatin/vps.uf>
and
<http://lxr.mozilla.org/seamonkey/source/intl/uconv/ucvlatin/vps.ut>
if you are interested in helping us.
.IP "Various Mac encodings" 4
.IX Item "Various Mac encodings"
The following are unsupported due to the lack of mapping data. 
.Sp
.Vb 5
\&  MacArmenian,  MacBengali,   MacBurmese,   MacEthiopic
\&  MacExtArabic, MacGeorgian,  MacKannada,   MacKhmer
\&  MacLaotian,   MacMalayalam, MacMongolian, MacOriya
\&  MacSinhalese, MacTamil,     MacTelugu,    MacTibetan
\&  MacVietnamese
.Ve
.Sp
The rest which are already available are based upon the vendor mappings
at <http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/> .
.IP "(Mac) Indic encodings" 4
.IX Item "(Mac) Indic encodings"
The maps for the following are available at <http://www.unicode.org/>
but remain unsupport because those encodings need algorithmical
approach, currently unsupported by \fIenc2xs\fR:
.Sp
.Vb 3
\&  MacDevanagari
\&  MacGurmukhi
\&  MacGujarati
.Ve
.Sp
For details, please see \f(CW\*(C`Unicode mapping issues and notes:\*(C'\fR at
<http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/DEVANAGA.TXT> .
.Sp
I believe this issue is prevalent not only for Mac Indics but also in
other Indic encodings, but the above were the only Indic encodings
maps that I could find at <http://www.unicode.org/> .
.SH "Encoding vs. Charset \*(-- terminology"
.IX Header "Encoding vs. Charset  terminology"
We are used to using the term (character) \fIencoding\fR and \fIcharacter
set\fR interchangeably.  But just as confusing the terms byte and
character is dangerous and the terms should be differentiated when
needed, we need to differentiate \fIencoding\fR and \fIcharacter set\fR.
.PP
To understand that, here is a description of how we make computers
grok our characters.
.IP "\(bu" 4
First we start with which characters to include.  We call this
collection of characters \fIcharacter repertoire\fR.
.IP "\(bu" 4
Then we have to give each character a unique \s-1ID\s0 so your computer can
tell the difference between 'a' and 'A'.  This itemized character
repertoire is now a \fIcharacter set\fR.
.IP "\(bu" 4
If your computer can grow the character set without further
processing, you can go ahead and use it.  This is called a \fIcoded
character set\fR (\s-1CCS\s0) or \fIraw character encoding\fR.  \s-1ASCII\s0 is used this
way for most cases.
.IP "\(bu" 4
But in many cases, especially multi-byte \s-1CJK\s0 encodings, you have to
tweak a little more.  Your network connection may not accept any data
with the Most Significant Bit set, and your computer may not be able to
tell if a given byte is a whole character or just half of it.  So you
have to \fIencode\fR the character set to use it.
.Sp
A \fIcharacter encoding scheme\fR (\s-1CES\s0) determines how to encode a given
character set, or a set of multiple character sets.  7bit \s-1ISO\-2022\s0 is
an example of a \s-1CES\s0.  You switch between character sets via \fIescape
sequences\fR.
.PP
Technically, or mathematically, speaking, a character set encoded in
such a \s-1CES\s0 that maps character by character may form a \s-1CCS\s0.  \s-1EUC\s0 is such
an example.  The \s-1CES\s0 of \s-1EUC\s0 is as follows:
.IP "\(bu" 4
Map \s-1ASCII\s0 unchanged.
.IP "\(bu" 4
Map such a character set that consists of 94 or 96 powered by N
members by adding 0x80 to each byte.
.IP "\(bu" 4
You can also use 0x8e and 0x8f to indicate that the following sequence of
characters belongs to yet another character set.  To each following byte
is added the value 0x80.
.PP
By carefully looking at the encoded byte sequence, you can find that the
byte sequence conforms a unique number.  In that sense, \s-1EUC\s0 is a \s-1CCS\s0
generated by a \s-1CES\s0 above from up to four \s-1CCS\s0 (complicated?).  \s-1UTF\-8\s0
falls into this category.  See \*(L"\s-1UTF\-8\s0\*(R" in perlUnicode to find out how
\&\s-1UTF\-8\s0 maps Unicode to a byte sequence.
.PP
You may also have found out by now why 7bit \s-1ISO\-2022\s0 cannot comprise
a \s-1CCS\s0.  If you look at a byte sequence \ex21\ex21, you can't tell if
it is two !'s or \s-1IDEOGRAPHIC\s0 \s-1SPACE\s0.  \s-1EUC\s0 maps the latter to \exA1\exA1
so you have no trouble differentiating between \*(L"!!\*(R". and \*(L"\ \*(R".
.SH "Encoding Classification (by Anton Tagunov and Dan Kogai)"
.IX Header "Encoding Classification (by Anton Tagunov and Dan Kogai)"
This section tries to classify the supported encodings by their 
applicability for information exchange over the Internet and to 
choose the most suitable aliases to name them in the context of 
such communication.
.IP "\(bu" 4
To (en|de)code encodings marked by \f(CW\*(C`(**)\*(C'\fR, you need 
\&\f(CW\*(C`Encode::HanExtra\*(C'\fR, available from \s-1CPAN\s0.
.PP
Encoding names
.PP
.Vb 3
\&  US-ASCII    UTF-8    ISO-8859-*  KOI8-R
\&  Shift_JIS   EUC-JP   ISO-2022-JP ISO-2022-JP-1
\&  EUC-KR      Big5     GB2312
.Ve
.PP
are registered with \s-1IANA\s0 as preferred \s-1MIME\s0 names and may
be used over the Internet.
.PP
\&\f(CW\*(C`Shift_JIS\*(C'\fR has been officialized by \s-1JIS\s0 X 0208:1997.
\&\*(L"Microsoft\-related naming mess\*(R" gives details.
.PP
\&\f(CW\*(C`GB2312\*(C'\fR is the \s-1IANA\s0 name for \f(CW\*(C`EUC\-CN\*(C'\fR.
See \*(L"Microsoft\-related naming mess\*(R" for details.
.PP
\&\f(CW\*(C`GB_2312\-80\*(C'\fR \fIraw\fR encoding is available as \f(CW\*(C`gb2312\-raw\*(C'\fR
with Encode. See Encode::CN for details.
.PP
.Vb 2
\&  EUC-CN
\&  KOI8-U        [RFC2319]
.Ve
.PP
have not been registered with \s-1IANA\s0 (as of March 2002) but
seem to be supported by major web browsers. 
The \s-1IANA\s0 name for \f(CW\*(C`EUC\-CN\*(C'\fR is \f(CW\*(C`GB2312\*(C'\fR.
.PP
.Vb 1
\&  KS_C_5601-1987
.Ve
.PP
is heavily misused.
See \*(L"Microsoft\-related naming mess\*(R" for details.
.PP
\&\f(CW\*(C`KS_C_5601\-1987\*(C'\fR \fIraw\fR encoding is available as \f(CW\*(C`kcs5601\-raw\*(C'\fR
with Encode. See Encode::KR for details.
.PP
.Vb 1
\&  UTF-16 UTF-16BE UTF-16LE
.Ve
.PP
are IANA-registered \f(CW\*(C`charset\*(C'\fRs. See [\s-1RFC\s0 2781] for details.
Jungshik Shin reports that \s-1UTF\-16\s0 with a \s-1BOM\s0 is well accepted
by \s-1MS\s0 \s-1IE\s0 5/6 and \s-1NS\s0 4/6. Beware however that
.IP "\(bu" 4
\&\f(CW\*(C`UTF\-16\*(C'\fR support in any software you're going to be
using/interoperating with has probably been less tested
then \f(CW\*(C`UTF\-8\*(C'\fR support
.IP "\(bu" 4
\&\f(CW\*(C`UTF\-8\*(C'\fR coded data seamlessly passes traditional
command piping (\f(CW\*(C`cat\*(C'\fR, \f(CW\*(C`more\*(C'\fR, etc.) while \f(CW\*(C`UTF\-16\*(C'\fR coded
data is likely to cause confusion (with its zero bytes,
for example)
.IP "\(bu" 4
it is beyond the power of words to describe the way \s-1HTML\s0 browsers
encode non\-\f(CW\*(C`ASCII\*(C'\fR form data. To get a general impression, visit
<http://ppewww.ph.gla.ac.uk/~flavell/charset/form\-i18n.html>.
While encoding of form data has stabilized for \f(CW\*(C`UTF\-8\*(C'\fR encoded pages
(at least \s-1IE\s0 5/6, \s-1NS\s0 6, and Opera 6 behave consistently), be sure to
expect fun (and cross-browser discrepancies) with \f(CW\*(C`UTF\-16\*(C'\fR encoded
pages!
.PP
The rule of thumb is to use \f(CW\*(C`UTF\-8\*(C'\fR unless you know what
you're doing and unless you really benefit from using \f(CW\*(C`UTF\-16\*(C'\fR.
.PP
.Vb 5
\&  ISO-IR-165    [RFC1345]
\&  VISCII
\&  GB 12345
\&  GB 18030 (**)  (see links bellow)
\&  EUC-TW   (**)
.Ve
.PP
are totally valid encodings but not registered at \s-1IANA\s0.
The names under which they are listed here are probably the
most widely-known names for these encodings and are recommended
names.
.PP
.Vb 1
\&  BIG5PLUS (**)
.Ve
.PP
is a proprietary name. 
.Sh "Microsoft-related naming mess"
.IX Subsection "Microsoft-related naming mess"
Microsoft products misuse the following names:
.IP "\s-1KS_C_5601\-1987\s0" 4
.IX Item "KS_C_5601-1987"
Microsoft extension to \f(CW\*(C`EUC\-KR\*(C'\fR.
.Sp
Proper names: \f(CW\*(C`CP949\*(C'\fR, \f(CW\*(C`UHC\*(C'\fR, \f(CW\*(C`x\-windows\-949\*(C'\fR (as used by Mozilla).
.Sp
See <http://lists.w3.org/Archives/Public/ietf\-charsets/2001AprJun/0033.html>
for details.
.Sp
Encode aliases \f(CW\*(C`KS_C_5601\-1987\*(C'\fR to \f(CW\*(C`cp949\*(C'\fR to reflect this common
misusage. \fIRaw\fR \f(CW\*(C`KS_C_5601\-1987\*(C'\fR encoding is available as
\&\f(CW\*(C`kcs5601\-raw\*(C'\fR.
.Sp
See Encode::KR for details.
.IP "\s-1GB2312\s0" 4
.IX Item "GB2312"
Microsoft extension to \f(CW\*(C`EUC\-CN\*(C'\fR.
.Sp
Proper names: \f(CW\*(C`CP936\*(C'\fR, \f(CW\*(C`GBK\*(C'\fR.
.Sp
\&\f(CW\*(C`GB2312\*(C'\fR has been registered in the \f(CW\*(C`EUC\-CN\*(C'\fR meaning at
\&\s-1IANA\s0. This has partially repaired the situation: Microsoft's 
\&\f(CW\*(C`GB2312\*(C'\fR has become a superset of the official \f(CW\*(C`GB2312\*(C'\fR.
.Sp
Encode aliases \f(CW\*(C`GB2312\*(C'\fR to \f(CW\*(C`euc\-cn\*(C'\fR in full agreement with
\&\s-1IANA\s0 registration. \f(CW\*(C`cp936\*(C'\fR is supported separately.
\&\fIRaw\fR \f(CW\*(C`GB_2312\-80\*(C'\fR encoding is available as \f(CW\*(C`gb2312\-raw\*(C'\fR.
.Sp
See Encode::CN for details.
.IP "Big5" 4
.IX Item "Big5"
Microsoft extension to \f(CW\*(C`Big5\*(C'\fR.
.Sp
Proper name: \f(CW\*(C`CP950\*(C'\fR.
.Sp
Encode separately supports \f(CW\*(C`Big5\*(C'\fR and \f(CW\*(C`cp950\*(C'\fR.
.IP "Shift_JIS" 4
.IX Item "Shift_JIS"
Microsoft's understanding of \f(CW\*(C`Shift_JIS\*(C'\fR.
.Sp
\&\s-1JIS\s0 has not endorsed the full Microsoft standard however.
The official \f(CW\*(C`Shift_JIS\*(C'\fR includes only \s-1JIS\s0 X 0201 and \s-1JIS\s0 X 0208
character sets, while Microsoft has always used \f(CW\*(C`Shift_JIS\*(C'\fR
to encode a wider character repertoire. See \f(CW\*(C`IANA\*(C'\fR registration for
\&\f(CW\*(C`Windows\-31J\*(C'\fR.
.Sp
As a historical predecessor, Microsoft's variant
probably has more rights for the name, though it may be objected
that Microsoft shouldn't have used \s-1JIS\s0 as part of the name
in the first place.
.Sp
Unambiguous name: \f(CW\*(C`CP932\*(C'\fR. \f(CW\*(C`IANA\*(C'\fR name (not used?): \f(CW\*(C`Windows\-31J\*(C'\fR.
.Sp
Encode separately supports \f(CW\*(C`Shift_JIS\*(C'\fR and \f(CW\*(C`cp932\*(C'\fR.
.SH "Glossary"
.IX Header "Glossary"
.IP "character repertoire" 4
.IX Item "character repertoire"
A collection of unique characters.  A \fIcharacter\fR set in the strictest
sense. At this stage, characters are not numbered.
.IP "coded character set (\s-1CCS\s0)" 4
.IX Item "coded character set (CCS)"
A character set that is mapped in a way computers can use directly.
Many character encodings, including \s-1EUC\s0, fall in this category.
.IP "character encoding scheme (\s-1CES\s0)" 4
.IX Item "character encoding scheme (CES)"
An algorithm to map a character set to a byte sequence.  You don't
have to be able to tell which character set a given byte sequence
belongs.  7\-bit \s-1ISO\-2022\s0 is a \s-1CES\s0 but it cannot be a \s-1CCS\s0.  \s-1EUC\s0 is an
example of being both a \s-1CCS\s0 and \s-1CES\s0.
.IP "charset (in \s-1MIME\s0 context)" 4
.IX Item "charset (in MIME context)"
has long been used in the meaning of \f(CW\*(C`encoding\*(C'\fR, \s-1CES\s0.
.Sp
While the word combination \f(CW\*(C`character set\*(C'\fR has lost this meaning
in \s-1MIME\s0 context since [\s-1RFC\s0 2130], the \f(CW\*(C`charset\*(C'\fR abbreviation has
retained it. This is how [\s-1RFC\s0 2277] and [\s-1RFC\s0 2278] bless \f(CW\*(C`charset\*(C'\fR:
.Sp
.Vb 7
\& This document uses the term "charset" to mean a set of rules for
\& mapping from a sequence of octets to a sequence of characters, such
\& as the combination of a coded character set and a character encoding
\& scheme; this is also what is used as an identifier in MIME "charset="
\& parameters, and registered in the IANA charset registry ...  (Note
\& that this is NOT a term used by other standards bodies, such as ISO).
\&                                               [RFC 2277]
.Ve
.IP "\s-1EUC\s0" 4
.IX Item "EUC"
Extended Unix Character.  See \s-1ISO\-2022\s0.
.IP "\s-1ISO\-2022\s0" 4
.IX Item "ISO-2022"
A \s-1CES\s0 that was carefully designed to coexist with \s-1ASCII\s0.  There are a 7
bit version and an 8 bit version.  
.Sp
The 7 bit version switches character set via escape sequence so it
cannot form a \s-1CCS\s0.  Since this is more difficult to handle in programs
than the 8 bit version, the 7 bit version is not very popular except for
iso\-2022\-jp, the \fIde facto\fR standard \s-1CES\s0 for e\-mails.
.Sp
The 8 bit version can form a \s-1CCS\s0.  \s-1EUC\s0 and \s-1ISO\-8859\s0 are two examples
thereof.  Pre\-5.6 perl could use them as string literals.
.IP "\s-1UCS\s0" 4
.IX Item "UCS"
Short for \fIUniversal Character Set\fR.  When you say just \s-1UCS\s0, it means
\&\fIUnicode\fR.
.IP "\s-1UCS\-2\s0" 4
.IX Item "UCS-2"
\&\s-1ISO/IEC\s0 10646 encoding form: Universal Character Set coded in two
octets.
.IP "Unicode" 4
.IX Item "Unicode"
A character set that aims to include all character repertoires of the
world.  Many character sets in various national as well as industrial
standards have become, in a way, just subsets of Unicode.
.IP "\s-1UTF\s0" 4
.IX Item "UTF"
Short for \fIUnicode Transformation Format\fR.  Determines how to map a
Unicode character into a byte sequence.
.IP "\s-1UTF\-16\s0" 4
.IX Item "UTF-16"
A \s-1UTF\s0 in 16\-bit encoding.  Can either be in big endian or little
endian.  The big endian version is called \s-1UTF\-16BE\s0 (equal to \s-1UCS\-2\s0 + 
surrogate support) and the little endian version is called \s-1UTF\-16LE\s0.
.SH "See Also"
.IX Header "See Also"
Encode, 
Encode::Byte, 
Encode::CN, Encode::JP, Encode::KR, Encode::TW,
Encode::EBCDIC, Encode::Symbol
Encode::MIME::Header, Encode::Guess
.SH "References"
.IX Header "References"
.IP "\s-1ECMA\s0" 4
.IX Item "ECMA"
European Computer Manufacturers Association
<http://www.ecma.ch>
.RS 4
.ie n .IP "\s-1ECMA\-035\s0 (eq ""ISO\-2022"")" 4
.el .IP "\s-1ECMA\-035\s0 (eq \f(CWISO\-2022\fR)" 4
.IX Item "ECMA-035 (eq ISO-2022)"
<http://www.ecma.ch/ecma1/STAND/ECMA\-035.HTM> 
.Sp
The specification of \s-1ISO\-2022\s0 is available from the link above.
.RE
.RS 4
.RE
.IP "\s-1IANA\s0" 4
.IX Item "IANA"
Internet Assigned Numbers Authority
<http://www.iana.org/>
.RS 4
.IP "Assigned Charset Names by \s-1IANA\s0" 4
.IX Item "Assigned Charset Names by IANA"
<http://www.iana.org/assignments/character\-sets>
.Sp
Most of the \f(CW\*(C`canonical names\*(C'\fR in Encode derive from this list
so you can directly apply the string you have extracted from \s-1MIME\s0
header of mails and web pages.
.RE
.RS 4
.RE
.IP "\s-1ISO\s0" 4
.IX Item "ISO"
International Organization for Standardization
<http://www.iso.ch/>
.IP "\s-1RFC\s0" 4
.IX Item "RFC"
Request For Comments \*(-- need I say more?
<http://www.rfc\-editor.org/>, <http://www.rfc.net/>,
<http://www.faqs.org/rfcs/>
.IP "\s-1UC\s0" 4
.IX Item "UC"
Unicode Consortium
<http://www.unicode.org/>
.RS 4
.IP "Unicode Glossary" 4
.IX Item "Unicode Glossary"
<http://www.unicode.org/glossary/>
.Sp
The glossary of this document is based upon this site.
.RE
.RS 4
.RE
.Sh "Other Notable Sites"
.IX Subsection "Other Notable Sites"
.IP "czyborra.com" 4
.IX Item "czyborra.com"
<http://czyborra.com/>
.Sp
Contains a a lot of useful information, especially gory details of \s-1ISO\s0
vs. vendor mappings.
.IP "\s-1CJK\s0.inf" 4
.IX Item "CJK.inf"
<http://www.oreilly.com/people/authors/lunde/cjk_inf.html>
.Sp
Somewhat obsolete (last update in 1996), but still useful.  Also try
.Sp
<ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/pdf/GB18030_Summary.pdf>
.Sp
You will find brief info on \f(CW\*(C`EUC\-CN\*(C'\fR, \f(CW\*(C`GBK\*(C'\fR and mostly on \f(CW\*(C`GB 18030\*(C'\fR.
.IP "Jungshik Shin's Hangul \s-1FAQ\s0" 4
.IX Item "Jungshik Shin's Hangul FAQ"
<http://jshin.net/faq>
.Sp
And especially its subject 8.
.Sp
<http://jshin.net/faq/qa8.html>
.Sp
A comprehensive overview of the Korean (\f(CW\*(C`KS *\*(C'\fR) standards.
.ie n .IP "debian.org: ""Introduction to i18n""" 4
.el .IP "debian.org: ``Introduction to i18n''" 4
.IX Item "debian.org: Introduction to i18n"
A brief description for most of the mentioned \s-1CJK\s0 encodings is
contained in
<http://www.debian.org/doc/manuals/intro\-i18n/ch\-codes.en.html>
.Sh "Offline sources"
.IX Subsection "Offline sources"
.ie n .IP """CJKV Information Processing"" by Ken Lunde" 4
.el .IP "\f(CWCJKV Information Processing\fR by Ken Lunde" 4
.IX Item "CJKV Information Processing by Ken Lunde"
\&\s-1CJKV\s0 Information Processing
1999 O'Reilly & Associates, \s-1ISBN\s0 : 1\-56592\-224\-7
.Sp
The modern successor of \f(CW\*(C`CJK.inf\*(C'\fR.
.Sp
Features a comprehensive coverage of \s-1CJKV\s0 character sets and
encodings along with many other issues faced by anyone trying
to better support \s-1CJKV\s0 languages/scripts in all the areas of
information processing.
.Sp
To purchase this book, visit
<http://www.oreilly.com/catalog/cjkvinfo/>
or your favourite bookstore.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.