Encode::Supported(3pm)

okay bestie, this is Encode::Supported(3pm) from the Perl Programmers Reference Guide, and weโ€™re about to go through every encoding Encode supports like itโ€™s the group-chat receipts. no skips. ๐Ÿ’…

๐ŸŒธ NAME ๐ŸŒธ

Encode::Supported -- Encodings supported by Encode

โœจ DESCRIPTION โœจ

๐ŸŽ€ Encoding Names ๐ŸŽ€

Encoding names are case insensitive. White space in names is ignored. Also, an encoding may have aliases. Each encoding has one โ€œcanonicalโ€ name. The โ€œcanonicalโ€ name is chosen from the names of the encoding by picking the first in the following sequence (with a few exceptions).

  1. 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.
  2. The MIME name as defined in IETF RFCs. This includes all "iso-"s.
  3. The name in the IANA registry.
  4. The name used by the organization that defined it.

In case de jure 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.

Because of all the alias issues, and because in the general case encodings have state, "Encode" uses an encoding object internally once an operation is in progress.

๐Ÿ’– 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, "ISO 8859 1" and "iso-8859-1" are identical. periodt.

Encodings are categorized and implemented in several different modules, but you donโ€™t have to "use Encode::XX" to make them available for most cases. Encode.pm will automatically load those modules on demand. slay.

๐ŸŒŸ Built-in Encodings ๐ŸŒŸ

The following encodings are always available.

  • ascii โ€” aliases: US-ascii, ISO-646-US; reference: [ECMA]
  • ascii-ctrl โ€” Special Encoding
  • iso-8859-1 โ€” alias: latin1; reference: [ISO]
  • null โ€” Special Encoding
  • utf8 โ€” alias: UTF-8; reference: [RFC2279]

null and ascii-ctrl are special. "null" fails for all character, so when you set fallback mode to PERLQQ, HTMLCREF or XMLCREF, ALL CHARACTERS will fall back to character references. Ditto for "ascii-ctrl" except for control characters. For fallback modes, see Encode.

๐Ÿฆ‹ Encode::Unicode -- other Unicode encodings ๐Ÿฆ‹

Unicode coding schemes other than native utf8 are supported by Encode::Unicode, which will be autoloaded on demand.

  • UCS-2BE โ€” aliases: UCS-2, iso-10646-1; references: [IANA, UC]
  • UCS-2LE โ€” reference: [UC]
  • UTF-16 โ€” reference: [UC]
  • UTF-16BE โ€” reference: [UC]
  • UTF-16LE โ€” reference: [UC]
  • UTF-32 โ€” reference: [UC]
  • UTF-32BE โ€” alias: UCS-4; reference: [UC]
  • UTF-32LE โ€” reference: [UC]
  • UTF-7 โ€” reference: [RFC2152]

To find how (UCS-2|UTF-(16|32))(LE|BE)? differ from one another, see Encode::Unicode.

UTF-7 is a special encoding which โ€œre-encodesโ€ UTF-16BE into a 7-bit encoding. It is implemented separately by Encode::Unicode::UTF7.

๐Ÿ’œ Encode::Byte -- Extended ASCII ๐Ÿ’œ

Encode::Byte implements most single-byte encodings except for Symbols and EBCDIC. The following encodings are based on single-byte encodings implemented as extended ASCII. Most of them map \x80-\xff (upper half) to non-ASCII characters.

๐ŸŒˆ ISO-8859 and corresponding vendor mappings ๐ŸŒˆ

Since there are so many, theyโ€™re organized by language/region with the corresponding encoding names by vendor. Note that the ordering follows ISO-8859 and the corresponding vendor mappings are slightly different from that of ISO. See http://czyborra.com/charsets/iso8859.html for details.

The columns are Lang/Regions, ISO/Other Std., DOS, Windows, Macintosh, and Others.

  • N. America โ€” ISO/Other Std.: (ASCII); DOS: cp437, cp863 (DOSCanadaF); Others: AdobeStandardEncoding
  • W. Europe โ€” ISO/Other Std.: iso-8859-1; DOS: cp850, cp860 (DOSPortuguese); Windows: cp1252; Macintosh: MacRoman; Others: nextstep, hp-roman8
  • Cntrl. Europe โ€” ISO/Other Std.: iso-8859-2; DOS: cp852; Windows: cp1250; Macintosh: MacCentralEurRoman, MacCroatian, MacRomanian, MacRumanian
  • Latin3[1] โ€” ISO/Other Std.: iso-8859-3
  • Latin4[2] โ€” ISO/Other Std.: iso-8859-4
  • Cyrillics (see also next section) โ€” ISO/Other Std.: iso-8859-5; DOS: cp855, cp866; Windows: cp1251; Macintosh: MacCyrillic, MacUkrainian
  • Arabic โ€” ISO/Other Std.: iso-8859-6; DOS: cp864, cp1006; Windows: cp1256; Macintosh: MacArabic, MacFarsi
  • Greek โ€” ISO/Other Std.: iso-8859-7; DOS: cp737, cp869 (DOSGreek2); Windows: cp1253; Macintosh: MacGreek
  • Hebrew โ€” ISO/Other Std.: iso-8859-8; DOS: cp862; Windows: cp1255; Macintosh: MacHebrew
  • Turkish โ€” ISO/Other Std.: iso-8859-9; DOS: cp857; Windows: cp1254; Macintosh: MacTurkish
  • Nordics โ€” ISO/Other Std.: iso-8859-10; DOS: cp865, cp861; Macintosh: MacIcelandic, MacSami
  • Thai โ€” ISO/Other Std.: iso-8859-11[3]; DOS: cp874; Macintosh: MacThai

(iso-8859-12 is nonexistent. Reserved for Indics?)

  • Baltics โ€” ISO/Other Std.: iso-8859-13; DOS: cp775; Windows: cp1257
  • Celtics โ€” ISO/Other Std.: iso-8859-14
  • Latin9 [4] โ€” ISO/Other Std.: iso-8859-15
  • Latin10 โ€” ISO/Other Std.: iso-8859-16
  • Vietnamese โ€” ISO/Other Std.: viscii; Windows: cp1258; Macintosh: MacVietnamese

Footnotes, bestie:

  • [1] Esperanto, Maltese, and Turkish. Turkish is now on 8859-9.
  • [2] Baltics. Now on 8859-10, except for Latvian.
  • [3] TIS 620 + Non-Breaking Space (0xA0 / U+00A0)
  • [4] Nicknamed Latin0; the Euro sign as well as French and Finnish letters that are missing from 8859-1 were added.

All cp* are also available as ibm-*, ms-*, and windows-* . See also http://czyborra.com/charsets/codepages.html.

Macintosh encodings donโ€™t seem to be registered in such entities as IANA. "Canonical" names in Encode are based upon Appleโ€™s Tech Note 1150. See http://developer.apple.com/technotes/tn/tn1150.html for details.

๐ŸŒธ KOI8 - De Facto Standard for the Cyrillic world ๐ŸŒธ

Though ISO-8859 does have ISO-8859-5, the KOI8 series is far more popular in the Net. Encode comes with the following KOI charsets. For gory details, see http://czyborra.com/charsets/cyrillic.html

  • koi8-f
  • koi8-r โ€” alias: cp878; reference: [RFC1489]
  • koi8-u โ€” reference: [RFC2319]

๐Ÿซถ gsm0338 - Hentai Latin 1 ๐Ÿซถ

GSM0338 is for GSM handsets. Though it shares alphanumerals with ASCII, control character ranges and other parts are mapped very differently, mainly to store Greek characters. There are also escape sequences (starting with 0x1B) to cover e.g. the Euro sign.

This was once handled by Encode::Bytes, but because of all those unusual specifications, Encode 2.20 has relocated the support to Encode::GSM0338. See Encode::GSM0338 for details.

๐ŸŽ€ gsm0338 support before 2.19 ๐ŸŽ€

Some special cases like a trailing 0x00 byte or a lone 0x1B byte are not well-defined and decode() will return an empty string for them. One possible workaround is

$gsm =~ s/\x00\z/\x00\x00/;
$uni = decode("gsm0338", $gsm);
$uni .= "\xA0" if $gsm =~ /\x1B\z/;

Note that the Encode implementation of GSM0338 does not implement the reuse of Latin capital letters as Greek capital letters (for example, the 0x5A is U+005A (LATIN CAPITAL LETTER Z), not U+0396 (GREEK CAPITAL LETTER ZETA).

The GSM0338 is also covered in Encode::Byte even though it is not an "extended ASCII" encoding.

๐Ÿ‘‘ CJK: Chinese, Japanese, Korean (Multibyte) ๐Ÿ‘‘

Note that Vietnamese is listed above. Also read "Encoding vs Charset" below. Also note that these are implemented in distinct modules by countries, due to the size concerns (simplified Chinese is mapped to 'CN', continental China, while traditional Chinese is mapped to 'TW', Taiwan). Please refer to their respective documentation pages.

๐Ÿงš Encode::CN -- Continental China ๐Ÿงš

Columns: Standard, DOS/Win, Macintosh, Comment/Reference.

  • euc-cn [1] โ€” Macintosh: MacChineseSimp
  • (gbk) โ€” DOS/Win: cp936 [2]
  • gb12345-raw โ€” comment: { GB12345 without CES }
  • gb2312-raw โ€” comment: { GB2312 without CES }
  • hz
  • iso-ir-165
  • [1] GB2312 is aliased to this. See L<Microsoft-related naming mess>
  • [2] gbk is aliased to this. See L<Microsoft-related naming mess>

โญ Encode::JP -- Japan โญ

Columns: Standard, DOS/Win, Macintosh, Comment/Reference.

  • euc-jp
  • shiftjis โ€” DOS/Win: cp932; Macintosh: macJapanese
  • 7bit-jis
  • iso-2022-jp โ€” reference: [RFC1468]
  • iso-2022-jp-1 โ€” reference: [RFC2237]
  • jis0201-raw โ€” comment: { JIS X 0201 (roman + halfwidth kana) without CES }
  • jis0208-raw โ€” comment: { JIS X 0208 (Kanji + fullwidth kana) without CES }
  • jis0212-raw โ€” comment: { JIS X 0212 (Extended Kanji) without CES }

๐Ÿ“ Encode::KR -- Korea ๐Ÿ“

Columns: Standard, DOS/Win, Macintosh, Comment/Reference.

  • euc-kr โ€” Macintosh: MacKorean; reference: [RFC1557]
  • cp949 [1] โ€” DOS/Win
  • iso-2022-kr โ€” reference: [RFC1557]
  • johab โ€” reference: [KS X 1001:1998, Annex 3]
  • ksc5601-raw โ€” comment: { KSC5601 without CES }
  • [1] ks_c_5601-1987, (x-)?windows-949, and uhc are aliased to this. See below.

๐ŸŽ€ Encode::TW โ€” Taiwan

Taiwan representation, let's go:

  • Standard: big5-eten โ€” and heads up, big5 is aliased to big5-eten (so like, same thing, different name ๐Ÿ’…) โ€” plus big5-hkscs
  • DOS/Win: cp950
  • Macintosh: MacChineseTrad

๐ŸŒธ Encode::HanExtra โ€” More Chinese via CPAN

Okay so because size is literally a concern, all the extra Chinese encodings below ship separately on CPAN, in a module called Encode::HanExtra. Fancy, separate, still iconic:

  • 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

๐Ÿฆ‹ Encode::JIS2K โ€” JIS X 0213 encodings via CPAN

Same deal, size concerns again ๐Ÿ˜ญ so these extra Japanese encodings live separately on CPAN under the name Encode::JIS2K:

  • euc-jisx0213
  • shiftjisx0123
  • iso-2022-jp-3
  • jis0213-1-raw
  • jis0213-2-raw

๐Ÿ’œ Miscellaneous encodings

๐Ÿ”ฅ Encode::EBCDIC

For the details, go peep perlebcdic. Here's the squad:

cp37
cp500
cp875
cp1026
cp1047
posix-bc

โœจ Encode::Symbol

This one's for symbols and dingbats, bestie. Literally the fun fonts of the encoding world:

symbol
dingbats
MacDingbats
AdobeZdingbat
AdobeSymbol

๐Ÿ’– Encode::MIME::Header

Not gonna lie, strictly speaking the MIME header encoding documented in RFC 2047 is more of an encapsulation than an encoding. But supporting it in the modern world is imperative, so here we are, supported and slaying:

MIME-Header                                            [RFC2047]
MIME-B                                                 [RFC2047]
MIME-Q                                                 [RFC2047]

๐Ÿงš Encode::Guess

Plot twist: this isn't an encoding name at all ๐Ÿ’€ it's a utility that lets you pick the most appropriate encoding for your data out of a list of suspects you hand it. Full deets in Encode::Guess.


๐Ÿ’€ Unsupported encodings

These ones? Not supported as yet. Some because they're rarely used, some because of technical difficulties (the drama). They might get supported by external modules via CPAN in the future, though, so don't lose hope ๐Ÿซถ

๐Ÿ˜ญ ISO-2022-JP-2 [RFC1554]

Not very popular yet. To implement encode() you'd need a Unicode Database or equivalent, because it includes JIS X 0208/0212, KSC5601, and GB2312 all at the same time, and their code points in Unicode overlap. So you literally have to look up the database to figure out which character set a given Unicode character belongs to. Whole situation.

๐Ÿ™ˆ ISO-2022-CN [RFC1922]

Not very popular either. It needs CNS 11643-1 and -2, which aren't available in this module. (CNS 11643 is supported via euc-tw in Encode::HanExtra, so that's something.) Audrey Tang may add support for this encoding in her module in future ๐Ÿ‘€

๐ŸŒˆ Various HP-UX encodings

The following are unsupported because there's just no mapping data. No data, no vibes:

'8'  - arabic8, greek8, hebrew8, kana8, thai8, and turkish8
'15' - japanese15, korean15, and roi15

๐Ÿ“ Cyrillic encoding ISO-IR-111

Anton Tagunov doubts its usefulness. That's the whole note. We respect the honesty.

๐Ÿ’œ ISO-8859-8-1 [Hebrew]

Nobody on the Encode team knows Hebrew well enough ๐Ÿ˜ญ (ISO-8859-8, cp1255 and MacHebrew are supported โ€” and the reason is literally just that mappings were available at <http://www.unicode.org/>). Contributions welcome, fr fr.

๐ŸŒธ ISIRI 3342, Iran System, ISIRI 2900 [Farsi]

Ditto. (Same situation as above, bestie.)

๐ŸŽ€ Thai encoding TCVN

Ditto.

๐Ÿฆ‹ Vietnamese encodings VPS

Jungshik Shin reported that Mozilla supports this encoding, but it was too late before 5.8.0 for them to add it. In the future it may be available via a separate module. Peep <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're interested in helping out ๐Ÿ’–

๐Ÿ”ฅ Various Mac encodings

Unsupported due to the lack of mapping data, no cap:

MacArmenian,  MacBengali,   MacBurmese,   MacEthiopic
MacExtArabic, MacGeorgian,  MacKannada,   MacKhmer
MacLaotian,   MacMalayalam, MacMongolian, MacOriya
MacSinhalese, MacTamil,     MacTelugu,    MacTibetan
MacVietnamese

The rest, the ones that are already available, are based on the vendor mappings at <http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/> โญ

๐Ÿ’… (Mac) Indic encodings

The maps for these exist at <http://www.unicode.org/> but they remain unsupported, because these encodings need an algorithmical approach, which is currently unsupported by enc2xs:

MacDevanagari
MacGurmukhi
MacGujarati

For details, please see "Unicode mapping issues and notes:" at <http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/DEVANAGA.TXT>.

And honestly? I believe this issue is prevalent not only for Mac Indics but also in other Indic encodings โ€” but the above were the only Indic encoding maps that could be found at <http://www.unicode.org/>. So.


๐Ÿ‘‘ Encoding vs. Charset โ€” terminology

Okay so real talk. We're all used to throwing around the term (character) encoding and character set like they're interchangeable. But just like confusing the terms byte and character is dangerous and those two need differentiating when it matters, we need to differentiate encoding and character set too. Periodt.

To get why, here's the whole glow-up of how we make computers grok our characters:

  • First, we start with which characters to include. We call this collection of characters the character repertoire.
  • Then we have to give each character a unique ID so your computer can tell the difference between 'a' and 'A'. This itemized character repertoire is now a character set.
  • If your computer can grow the character set without further processing, you can go ahead and use it. This is called a coded character set (CCS) or raw character encoding. ASCII is used this way for most cases.
  • But in many cases โ€” especially multi-byte CJK 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 encode the character set to use it.

A character encoding scheme (CES) determines how to encode a given character set, or a set of multiple character sets. 7bit ISO-2022 is an example of a CES. You switch between character sets via escape sequences. Sneaky but iconic.

Technically, or mathematically, speaking, a character set encoded in such a CES that maps character by character may form a CCS. EUC is such an example. The CES of EUC goes like this:

  • Map ASCII unchanged.
  • Map such a character set that consists of 94 or 96 powered by N members by adding 0x80 to each byte.
  • 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.

By carefully looking at the encoded byte sequence, you can find that the byte sequence conforms a unique number. In that sense, EUC is a CCS generated by a CES above from up to four CCS (complicated? yeah, a little ๐Ÿ˜ญ). UTF-8 falls into this category. See "UTF-8" in perlUnicode to find out how UTF-8 maps Unicode to a byte sequence.

And you may also have found out by now why 7bit ISO-2022 cannot comprise a CCS. If you look at a byte sequence \x21\x21, you can't tell if it's two !'s or an IDEOGRAPHIC SPACE. EUC maps the latter to \xA1\xA1 so you have no trouble differentiating between "!!". and " ". Crisis averted ๐Ÿ’…

Encoding Classification (by Anton Tagunov and Dan Kogai) ๐Ÿงš

Okay bestie, this section is all about sorting the supported encodings by how much you can actually use them to exchange info over the Internet, and picking the aliases that make the most sense for that kind of communication.

  • To (en|de)code encodings marked by (**), you need Encode::HanExtra, available from CPAN.

Encoding names

US-ASCII    UTF-8    ISO-8859-*  KOI8-R
Shift_JIS   EUC-JP   ISO-2022-JP ISO-2022-JP-1
EUC-KR      Big5     GB2312

are registered with IANA as preferred MIME names and may be used over the Internet.

Shift_JIS has been officialized by JIS X 0208:1997. Microsoft-related naming mess gives details.

GB2312 is the IANA name for EUC-CN. See Microsoft-related naming mess for details.

GB_2312-80 raw encoding is available as gb2312-raw with Encode. See Encode::CN for details.

have not been registered with IANA (as of March 2002) but seem to be supported by major web browsers. The IANA name for EUC-CN is GB2312.

  • KS_C_5601-1987

is heavily misused. See Microsoft-related naming mess for details.

KS_C_5601-1987 raw encoding is available as kcs5601-raw with Encode. See Encode::KR for details.

  • UTF-16
  • UTF-16BE
  • UTF-16LE

are IANA-registered charsets. See [RFC 2781] for details. Jungshik Shin reports that UTF-16 with a BOM is well accepted by MS IE 5/6 and NS 4/6. Beware however that

  • UTF-16 support in any software you're going to be using/interoperating with has probably been less tested than UTF-8 support
  • UTF-8 coded data seamlessly passes traditional command piping (cat, more, etc.) while UTF-16 coded data is likely to cause confusion (with its zero bytes, for example)
  • it is beyond the power of words to describe the way HTML browsers encode non-ASCII form data. To get a general impression, visit <http://www.alanflavell.org.uk/charset/form-i18n.html>. While encoding of form data has stabilized for UTF-8 encoded pages (at least IE 5/6, NS 6, and Opera 6 behave consistently), be sure to expect fun (and cross-browser discrepancies) with UTF-16 encoded pages!

The rule of thumb is to use UTF-8 unless you know what you're doing and unless you really benefit from using UTF-16.

  • ISO-IR-165 [RFC1345]
  • VISCII
  • GB 12345
  • GB 18030 (**) (see links below)
  • EUC-TW (**)

are totally valid encodings but not registered at IANA. The names under which they are listed here are probably the most widely-known names for these encodings and are recommended names.

  • BIG5PLUS (**)

is a proprietary name.


Microsoft products misuse the following names:

  • KS_C_5601-1987 โ€” Microsoft extension to EUC-KR.
  • GB2312 โ€” Microsoft extension to EUC-CN.
    • Proper names: CP936, GBK.
    • GB2312 has been registered in the EUC-CN meaning at IANA. This has partially repaired the situation: Microsoft's GB2312 has become a superset of the official GB2312.
    • Encode aliases GB2312 to euc-cn in full agreement with IANA registration. cp936 is supported separately. Raw GB_2312-80 encoding is available as gb2312-raw.
    • See Encode::CN for details.
  • Big5 โ€” Microsoft extension to Big5.
    • Proper name: CP950.
    • Encode separately supports Big5 and cp950.
  • Shift_JIS โ€” Microsoft's understanding of Shift_JIS.
    • JIS has not endorsed the full Microsoft standard however. The official Shift_JIS includes only JIS X 0201 and JIS X 0208 character sets, while Microsoft has always used Shift_JIS to encode a wider character repertoire. See IANA registration for Windows-31J.
    • 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 JIS as part of the name in the first place.
    • Unambiguous name: CP932. IANA name (also used by Mozilla, and provided as an alias by Encode): Windows-31J.
    • Encode separately supports Shift_JIS and cp932.

Glossary ๐Ÿ“–

  • character repertoire โ€” A collection of unique characters. A character set in the strictest sense. At this stage, characters are not numbered.
  • coded character set (CCS) โ€” A character set that is mapped in a way computers can use directly. Many character encodings, including EUC, fall in this category.
  • 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 ISO-2022 is a CES but it cannot be a CCS. EUC is an example of being both a CCS and CES.
  • charset (in MIME context) โ€” has long been used in the meaning of "encoding", CES.

While the word combination "character set" has lost this meaning in MIME context since [RFC 2130], the "charset" abbreviation has retained it. This is how [RFC 2277] and [RFC 2278] bless "charset":

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]
  • EUC โ€” Extended Unix Character. See ISO-2022.
  • ISO-2022 โ€” A CES that was carefully designed to coexist with ASCII. There are a 7 bit version and an 8 bit version.

The 7 bit version switches character set via escape sequence so it cannot form a CCS. 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 de facto standard CES for e-mails.

The 8 bit version can form a CCS. EUC and ISO-8859 are two examples thereof. Pre-5.6 perl could use them as string literals.

  • UCS โ€” Short for Universal Character Set. When you say just UCS, it means Unicode.
  • UCS-2 โ€” ISO/IEC 10646 encoding form: Universal Character Set coded in two octets.
  • 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.
  • UTF โ€” Short for Unicode Transformation Format. Determines how to map a Unicode character into a byte sequence.
  • UTF-16 โ€” A UTF in 16-bit encoding. Can either be in big endian or little endian. The big endian version is called UTF-16BE (equal to UCS-2 + surrogate support) and the little endian version is called UTF-16LE.

See Also ๐Ÿ‘€

  • Encode
  • Encode::Byte
  • Encode::CN
  • Encode::JP
  • Encode::KR
  • Encode::TW
  • Encode::EBCDIC
  • Encode::Symbol
  • Encode::MIME::Header
  • Encode::Guess

References ๐Ÿ“š

ECMA

ECMA-035 (eq ISO-2022)

The specification of ISO-2022 is available from the link above.

IANA

Assigned Charset Names by IANA

Most of the "canonical names" in Encode derive from this list so you can directly apply the string you have extracted from MIME header of mails and web pages.

ISO

RFC

UC

Unicode Glossary

The glossary of this document is based upon this site.

Other Notable Sites ๐ŸŒ

Contains a lot of useful information, especially gory details of ISO vs. vendor mappings.

Somewhat obsolete (last update in 1996), but still useful. Also try

<ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/pdf/GB18030_Summary.pdf>

You will find brief info on EUC-CN, GBK and mostly on GB 18030.

And especially its subject 8.

<http://jshin.net/faq/qa8.html>

A comprehensive overview of the Korean (KS *) standards.

Offline sources ๐Ÿ“•

  • "CJKV Information Processing" by Ken Lunde โ€” CJKV Information Processing 1999 O'Reilly & Associates, ISBN : 1-56592-224-7

The modern successor of CJK.inf.

Features a comprehensive coverage of CJKV character sets and encodings along with many other issues faced by anyone trying to better support CJKV languages/scripts in all the areas of information processing.

To purchase this book, visit <http://oreilly.com/catalog/9780596514471/> or your favourite bookstore.


๐Ÿ’– That's the whole vibe check from Encode::Supported(3pm) โ€” brought to you by perl v5.42.3, dated 2026-11-03. Now go slay your encodings, bestie! ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from