CINXE.COM
Encode::Supported -- Encodings supported by Encode - Perldoc Browser
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Encode::Supported -- Encodings supported by Encode - Perldoc Browser</title> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser"> <link rel="canonical" href="https://perldoc.perl.org/Encode::Supported"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" /> <style> body { background: #f4f4f5; color: #020202; } .navbar-dark { background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%); background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%); background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0); background-repeat: repeat-x; } .navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-nav .nav-link:focus { color: #fff } .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 } #wrapperlicious { margin: 0 auto; font: 0.9em 'Helvetica Neue', Helvetica, sans-serif; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0; } #wrapperlicious h1 { font-size: 1.5em } #wrapperlicious h2 { font-size: 1.3em } #wrapperlicious h3 { font-size: 1.1em } #wrapperlicious h4 { font-size: 0.9em } #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3, #wrapperlicious h4, #wrapperlicious dt { color: #020202; margin-top: 1em; margin-bottom: 1em; position: relative; font-weight: bold; } #wrapperlicious a { color: inherit; text-decoration: underline } #wrapperlicious #toc { text-decoration: none } #wrapperlicious a:hover { color: #2a2a2a } #wrapperlicious a img { border: 0 } #wrapperlicious :not(pre) > code { color: inherit; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; font: 0.9em Consolas, Menlo, Monaco, monospace; padding: 0.3em; } #wrapperlicious dd { margin: 0; margin-left: 2em; } #wrapperlicious dt { color: #2a2a2a; font-weight: bold; margin-left: 0.9em; } #wrapperlicious p { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious li > p { margin-bottom: 0; margin-top: 0; } #wrapperlicious pre { border: 1px solid #c1c1c1; border-radius: 3px; font: 100% Consolas, Menlo, Monaco, monospace; margin-bottom: 1em; margin-top: 1em; } #wrapperlicious pre > code { display: block; background-color: #f6f6f6; font: 0.9em Consolas, Menlo, Monaco, monospace; line-height: 1.5em; text-align: left; white-space: pre; padding: 1em; } #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious ul { list-style-type: square; } #wrapperlicious ul ul { margin-bottom: 0px; margin-top: 0px; } #footer { font-size: 0.8em; padding-top: 0.5em; text-align: center; } #more { display: inline; font-size: 0.8em; } #perldocdiv { background-color: #fff; border: 1px solid #c1c1c1; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; margin-left: auto; margin-right: auto; padding: 3em; padding-top: 1em; max-width: 960px; } #moduleversion { float: right } #wrapperlicious .leading-notice { font-style: italic; padding-left: 1em; margin-top: 1em; margin-bottom: 1em; } #wrapperlicious .permalink { display: none; left: -0.75em; position: absolute; padding-right: 0.25em; text-decoration: none; } #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink, #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink, #wrapperlicious dt:hover .permalink { display: block; } </style> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KVNWBNT5FB'); gtag('config', 'UA-50555-3'); </script> </head> <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="/"><img src="/images/perl_camel_30.png" width="30" height="30" class="d-inline-block align-top" alt="Perl Camel Logo"> Perldoc Browser</a> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto"> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.30.3</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-stable"> <a class="dropdown-item" href="/Encode::Supported">Latest</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1/Encode::Supported">5.40.1</a> <a class="dropdown-item" href="/5.40.0/Encode::Supported">5.40.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3/Encode::Supported">5.38.3</a> <a class="dropdown-item" href="/5.38.2/Encode::Supported">5.38.2</a> <a class="dropdown-item" href="/5.38.1/Encode::Supported">5.38.1</a> <a class="dropdown-item" href="/5.38.0/Encode::Supported">5.38.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.36.3/Encode::Supported">5.36.3</a> <a class="dropdown-item" href="/5.36.2/Encode::Supported">5.36.2</a> <a class="dropdown-item" href="/5.36.1/Encode::Supported">5.36.1</a> <a class="dropdown-item" href="/5.36.0/Encode::Supported">5.36.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.34.3/Encode::Supported">5.34.3</a> <a class="dropdown-item" href="/5.34.2/Encode::Supported">5.34.2</a> <a class="dropdown-item" href="/5.34.1/Encode::Supported">5.34.1</a> <a class="dropdown-item" href="/5.34.0/Encode::Supported">5.34.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.32.1/Encode::Supported">5.32.1</a> <a class="dropdown-item" href="/5.32.0/Encode::Supported">5.32.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item active" href="/5.30.3/Encode::Supported">5.30.3</a> <a class="dropdown-item" href="/5.30.2/Encode::Supported">5.30.2</a> <a class="dropdown-item" href="/5.30.1/Encode::Supported">5.30.1</a> <a class="dropdown-item" href="/5.30.0/Encode::Supported">5.30.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/Encode::Supported">5.28.3</a> <a class="dropdown-item" href="/5.28.2/Encode::Supported">5.28.2</a> <a class="dropdown-item" href="/5.28.1/Encode::Supported">5.28.1</a> <a class="dropdown-item" href="/5.28.0/Encode::Supported">5.28.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.26.3/Encode::Supported">5.26.3</a> <a class="dropdown-item" href="/5.26.2/Encode::Supported">5.26.2</a> <a class="dropdown-item" href="/5.26.1/Encode::Supported">5.26.1</a> <a class="dropdown-item" href="/5.26.0/Encode::Supported">5.26.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.24.4/Encode::Supported">5.24.4</a> <a class="dropdown-item" href="/5.24.3/Encode::Supported">5.24.3</a> <a class="dropdown-item" href="/5.24.2/Encode::Supported">5.24.2</a> <a class="dropdown-item" href="/5.24.1/Encode::Supported">5.24.1</a> <a class="dropdown-item" href="/5.24.0/Encode::Supported">5.24.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.22.4/Encode::Supported">5.22.4</a> <a class="dropdown-item" href="/5.22.3/Encode::Supported">5.22.3</a> <a class="dropdown-item" href="/5.22.2/Encode::Supported">5.22.2</a> <a class="dropdown-item" href="/5.22.1/Encode::Supported">5.22.1</a> <a class="dropdown-item" href="/5.22.0/Encode::Supported">5.22.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.20.3/Encode::Supported">5.20.3</a> <a class="dropdown-item" href="/5.20.2/Encode::Supported">5.20.2</a> <a class="dropdown-item" href="/5.20.1/Encode::Supported">5.20.1</a> <a class="dropdown-item" href="/5.20.0/Encode::Supported">5.20.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.4/Encode::Supported">5.18.4</a> <a class="dropdown-item" href="/5.18.3/Encode::Supported">5.18.3</a> <a class="dropdown-item" href="/5.18.2/Encode::Supported">5.18.2</a> <a class="dropdown-item" href="/5.18.1/Encode::Supported">5.18.1</a> <a class="dropdown-item" href="/5.18.0/Encode::Supported">5.18.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.16.3/Encode::Supported">5.16.3</a> <a class="dropdown-item" href="/5.16.2/Encode::Supported">5.16.2</a> <a class="dropdown-item" href="/5.16.1/Encode::Supported">5.16.1</a> <a class="dropdown-item" href="/5.16.0/Encode::Supported">5.16.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.14.4/Encode::Supported">5.14.4</a> <a class="dropdown-item" href="/5.14.3/Encode::Supported">5.14.3</a> <a class="dropdown-item" href="/5.14.2/Encode::Supported">5.14.2</a> <a class="dropdown-item" href="/5.14.1/Encode::Supported">5.14.1</a> <a class="dropdown-item" href="/5.14.0/Encode::Supported">5.14.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.12.5/Encode::Supported">5.12.5</a> <a class="dropdown-item" href="/5.12.4/Encode::Supported">5.12.4</a> <a class="dropdown-item" href="/5.12.3/Encode::Supported">5.12.3</a> <a class="dropdown-item" href="/5.12.2/Encode::Supported">5.12.2</a> <a class="dropdown-item" href="/5.12.1/Encode::Supported">5.12.1</a> <a class="dropdown-item" href="/5.12.0/Encode::Supported">5.12.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/Encode::Supported">5.10.1</a> <a class="dropdown-item" href="/5.10.0/Encode::Supported">5.10.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.9/Encode::Supported">5.8.9</a> <a class="dropdown-item" href="/5.8.8/Encode::Supported">5.8.8</a> <a class="dropdown-item" href="/5.8.7/Encode::Supported">5.8.7</a> <a class="dropdown-item" href="/5.8.6/Encode::Supported">5.8.6</a> <a class="dropdown-item" href="/5.8.5/Encode::Supported">5.8.5</a> <a class="dropdown-item" href="/5.8.4/Encode::Supported">5.8.4</a> <a class="dropdown-item" href="/5.8.3/Encode::Supported">5.8.3</a> <a class="dropdown-item" href="/5.8.2/Encode::Supported">5.8.2</a> <a class="dropdown-item" href="/5.8.1/Encode::Supported">5.8.1</a> <a class="dropdown-item" href="/5.8.0/Encode::Supported">5.8.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.6.2/Encode::Supported">5.6.2</a> <a class="dropdown-item" href="/5.6.1/Encode::Supported">5.6.1</a> <a class="dropdown-item" href="/5.6.0/Encode::Supported">5.6.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_04/Encode::Supported">5.005_04</a> <a class="dropdown-item" href="/5.005_03/Encode::Supported">5.005_03</a> <a class="dropdown-item" href="/5.005_02/Encode::Supported">5.005_02</a> <a class="dropdown-item" href="/5.005_01/Encode::Supported">5.005_01</a> <a class="dropdown-item" href="/5.005/Encode::Supported">5.005</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-dev"> <a class="dropdown-item" href="/blead/Encode::Supported">blead</a> <a class="dropdown-item" href="/5.41.10/Encode::Supported">5.41.10</a> <a class="dropdown-item" href="/5.41.9/Encode::Supported">5.41.9</a> <a class="dropdown-item" href="/5.41.8/Encode::Supported">5.41.8</a> <a class="dropdown-item" href="/5.41.7/Encode::Supported">5.41.7</a> <a class="dropdown-item" href="/5.41.6/Encode::Supported">5.41.6</a> <a class="dropdown-item" href="/5.41.5/Encode::Supported">5.41.5</a> <a class="dropdown-item" href="/5.41.4/Encode::Supported">5.41.4</a> <a class="dropdown-item" href="/5.41.3/Encode::Supported">5.41.3</a> <a class="dropdown-item" href="/5.41.2/Encode::Supported">5.41.2</a> <a class="dropdown-item" href="/5.41.1/Encode::Supported">5.41.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1-RC1/Encode::Supported">5.40.1-RC1</a> <a class="dropdown-item" href="/5.40.0-RC2/Encode::Supported">5.40.0-RC2</a> <a class="dropdown-item" href="/5.40.0-RC1/Encode::Supported">5.40.0-RC1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.39.10/Encode::Supported">5.39.10</a> <a class="dropdown-item" href="/5.39.9/Encode::Supported">5.39.9</a> <a class="dropdown-item" href="/5.39.8/Encode::Supported">5.39.8</a> <a class="dropdown-item" href="/5.39.7/Encode::Supported">5.39.7</a> <a class="dropdown-item" href="/5.39.6/Encode::Supported">5.39.6</a> <a class="dropdown-item" href="/5.39.5/Encode::Supported">5.39.5</a> <a class="dropdown-item" href="/5.39.4/Encode::Supported">5.39.4</a> <a class="dropdown-item" href="/5.39.3/Encode::Supported">5.39.3</a> <a class="dropdown-item" href="/5.39.2/Encode::Supported">5.39.2</a> <a class="dropdown-item" href="/5.39.1/Encode::Supported">5.39.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3-RC1/Encode::Supported">5.38.3-RC1</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-nav"> <a class="dropdown-item" href="/5.30.3/perl">Perl</a> <a class="dropdown-item" href="/5.30.3/perlintro">Intro</a> <a class="dropdown-item" href="/5.30.3/perl#Tutorials">Tutorials</a> <a class="dropdown-item" href="/5.30.3/perlfaq">FAQs</a> <a class="dropdown-item" href="/5.30.3/perl#Reference-Manual">Reference</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/perlop">Operators</a> <a class="dropdown-item" href="/5.30.3/functions">Functions</a> <a class="dropdown-item" href="/5.30.3/variables">Variables</a> <a class="dropdown-item" href="/5.30.3/modules">Modules</a> <a class="dropdown-item" href="/5.30.3/perlutil">Utilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/perldelta">Release Notes</a> <a class="dropdown-item" href="/5.30.3/perlcommunity">Community</a> <a class="dropdown-item" href="/5.30.3/perlhist">History</a> </div> </li> </ul> <ul class="navbar-nav"> <script> function set_expand (expand) { var perldocdiv = document.getElementById('perldocdiv'); var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width'); var expanded = (width == '' || width == 'none') ? true : false; if (expand === null) { expand = !expanded; } if ((expand && !expanded) || (!expand && expanded)) { perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px'); var button_classlist = document.getElementById('content-expand-button').classList; if (expand) { button_classlist.add('btn-light'); button_classlist.remove('btn-outline-light'); } else { button_classlist.add('btn-outline-light'); button_classlist.remove('btn-light'); } } return expand; } function toggle_expand () { var expand = set_expand(null); document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC'; } function read_expand () { return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function () { if (read_expand()) { set_expand(true); } }); } else if (read_expand()) { set_expand(true); } </script> <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-4" onclick="toggle_expand()">Expand</button> </ul> <form class="form-inline" method="get" action="/5.30.3/search"> <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search" value=""> </form> </div> </nav> <div id="wrapperlicious" class="container-fluid"> <div id="perldocdiv"> <div id="links"> <a href="/5.30.3/Encode::Supported">Encode::Supported</a> <div id="more"> (<a href="/5.30.3/Encode::Supported.txt">source</a>, <a href="https://metacpan.org/pod/Encode::Supported">CPAN</a>) </div> </div> <div class="leading-notice"> You are viewing the version of this documentation from Perl 5.30.3. <a href="/Encode::Supported">View the latest version</a> </div> <h1><a id="toc">CONTENTS</a></h1> <ul> <li> <a class="text-decoration-none" href="#NAME">NAME</a> </li> <li> <a class="text-decoration-none" href="#DESCRIPTION">DESCRIPTION</a> <ul> <li> <a class="text-decoration-none" href="#Encoding-Names">Encoding Names</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#Supported-Encodings">Supported Encodings</a> <ul> <li> <a class="text-decoration-none" href="#Built-in-Encodings">Built-in Encodings</a> </li> <li> <a class="text-decoration-none" href="#Encode::Unicode-other-Unicode-encodings">Encode::Unicode -- other Unicode encodings</a> </li> <li> <a class="text-decoration-none" href="#Encode::Byte-Extended-ASCII">Encode::Byte -- Extended ASCII</a> </li> <li> <a class="text-decoration-none" href="#gsm0338-Hentai-Latin-1">gsm0338 - Hentai Latin 1</a> </li> <li> <a class="text-decoration-none" href="#CJK:-Chinese,-Japanese,-Korean-(Multibyte)">CJK: Chinese, Japanese, Korean (Multibyte)</a> </li> <li> <a class="text-decoration-none" href="#Miscellaneous-encodings">Miscellaneous encodings</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#Unsupported-encodings">Unsupported encodings</a> </li> <li> <a class="text-decoration-none" href="#Encoding-vs.-Charset-terminology">Encoding vs. Charset -- terminology</a> </li> <li> <a class="text-decoration-none" href="#Encoding-Classification-(by-Anton-Tagunov-and-Dan-Kogai)">Encoding Classification (by Anton Tagunov and Dan Kogai)</a> <ul> <li> <a class="text-decoration-none" href="#Microsoft-related-naming-mess">Microsoft-related naming mess</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#Glossary">Glossary</a> </li> <li> <a class="text-decoration-none" href="#See-Also">See Also</a> </li> <li> <a class="text-decoration-none" href="#References">References</a> <ul> <li> <a class="text-decoration-none" href="#Other-Notable-Sites">Other Notable Sites</a> </li> <li> <a class="text-decoration-none" href="#Offline-sources">Offline sources</a> </li> </ul> </li> </ul> <h1 id="NAME"><a class="permalink" href="#NAME">#</a>NAME</h1> <p>Encode::Supported -- Encodings supported by Encode</p> <h1 id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">#</a>DESCRIPTION</h1> <h2 id="Encoding-Names"><a class="permalink" href="#Encoding-Names">#</a><a id="Encoding"></a>Encoding Names</h2> <p>Encoding names are case insensitive. White space in names is ignored. In addition, 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).</p> <ul> <li><p>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.</p> </li> <li><p>The MIME name as defined in IETF RFCs. This includes all "iso-"s.</p> </li> <li><p>The name in the IANA registry.</p> </li> <li><p>The name used by the organization that defined it.</p> </li> </ul> <p>In case <i>de jure</i> 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.</p> <p>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.</p> <h1 id="Supported-Encodings"><a class="permalink" href="#Supported-Encodings">#</a><a id="Supported"></a>Supported Encodings</h1> <p>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.</p> <p>Encodings are categorized and implemented in several different modules but you don't have to <code>use Encode::XX</code> to make them available for most cases. Encode.pm will automatically load those modules on demand.</p> <h2 id="Built-in-Encodings"><a class="permalink" href="#Built-in-Encodings">#</a><a id="Built"></a>Built-in Encodings</h2> <p>The following encodings are always available.</p> <pre><code class="plaintext">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] ----------------------------------------------------------------</code></pre> <p><i>null</i> and <i>ascii-ctrl</i> 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 <a href="/5.30.3/Encode">Encode</a>.</p> <h2 id="Encode::Unicode-other-Unicode-encodings"><a class="permalink" href="#Encode::Unicode-other-Unicode-encodings">#</a><a id="Encode"></a><a id="Encode::Unicode----other-Unicode-encodings"></a>Encode::Unicode -- other Unicode encodings</h2> <p>Unicode coding schemes other than native utf8 are supported by Encode::Unicode, which will be autoloaded on demand.</p> <pre><code class="plaintext">---------------------------------------------------------------- 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] UTF-7 [RFC2152] ----------------------------------------------------------------</code></pre> <p>To find how (UCS-2|UTF-(16|32))(LE|BE)? differ from one another, see <a href="/5.30.3/Encode::Unicode">Encode::Unicode</a>.</p> <p>UTF-7 is a special encoding which "re-encodes" UTF-16BE into a 7-bit encoding. It is implemented separately by Encode::Unicode::UTF7.</p> <h2 id="Encode::Byte-Extended-ASCII"><a class="permalink" href="#Encode::Byte-Extended-ASCII">#</a><a id="Encode1"></a><a id="Encode::Byte----Extended-ASCII"></a>Encode::Byte -- Extended ASCII</h2> <p>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.</p> <dl> <dt id="ISO-8859-and-corresponding-vendor-mappings"><a class="permalink" href="#ISO-8859-and-corresponding-vendor-mappings">#</a><a id="ISO1"></a>ISO-8859 and corresponding vendor mappings</dt> <dd> <p>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 ISO-8859 and the corresponding vendor mappings are slightly different from that of ISO. See <a href="http://czyborra.com/charsets/iso8859.html">http://czyborra.com/charsets/iso8859.html</a> for details.</p> <pre><code class="plaintext">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 ---------------------------------------------------------------- [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.</code></pre> <p>All cp* are also available as ibm-*, ms-*, and windows-* . See also <a href="http://czyborra.com/charsets/codepages.html">http://czyborra.com/charsets/codepages.html</a>.</p> <p>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 <a href="http://developer.apple.com/technotes/tn/tn1150.html">http://developer.apple.com/technotes/tn/tn1150.html</a> for details.</p> </dd> <dt id="KOI8-De-Facto-Standard-for-the-Cyrillic-world"><a class="permalink" href="#KOI8-De-Facto-Standard-for-the-Cyrillic-world">#</a><a id="KOI8"></a><a id="KOI8---De-Facto-Standard-for-the-Cyrillic-world"></a>KOI8 - De Facto Standard for the Cyrillic world</dt> <dd> <p>Though ISO-8859 does have ISO-8859-5, the KOI8 series is far more popular in the Net. <a href="/5.30.3/Encode">Encode</a> comes with the following KOI charsets. For gory details, see <a href="http://czyborra.com/charsets/cyrillic.html">http://czyborra.com/charsets/cyrillic.html</a></p> <pre><code class="plaintext">---------------------------------------------------------------- koi8-f koi8-r cp878 [RFC1489] koi8-u [RFC2319] ----------------------------------------------------------------</code></pre> </dd> </dl> <h2 id="gsm0338-Hentai-Latin-1"><a class="permalink" href="#gsm0338-Hentai-Latin-1">#</a><a id="gsm0338"></a><a id="gsm0338---Hentai-Latin-1"></a>gsm0338 - Hentai Latin 1</h2> <p>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.</p> <p>This was once handled by <a href="/5.30.3/Encode::Bytes">Encode::Bytes</a> but because of all those unusual specifications, Encode 2.20 has relocated the support to <a href="/5.30.3/Encode::GSM0338">Encode::GSM0338</a>. See <a href="/5.30.3/Encode::GSM0338">Encode::GSM0338</a> for details.</p> <dl> <dt id="gsm0338-support-before-2.19"><a class="permalink" href="#gsm0338-support-before-2.19">#</a><a id="gsm03381"></a>gsm0338 support before 2.19</dt> <dd> <p>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</p> <pre><code>$gsm =~ s/\x00\z/\x00\x00/; $uni = decode("gsm0338", $gsm); $uni .= "\xA0" if $gsm =~ /\x1B\z/;</code></pre> <p>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).</p> <p>The GSM0338 is also covered in Encode::Byte even though it is not an "extended ASCII" encoding.</p> </dd> </dl> <h2 id="CJK:-Chinese,-Japanese,-Korean-(Multibyte)"><a class="permalink" href="#CJK:-Chinese,-Japanese,-Korean-(Multibyte)">#</a><a id="CJK"></a><a id="CJK:-Chinese-Japanese-Korean-Multibyte"></a>CJK: Chinese, Japanese, Korean (Multibyte)</h2> <p>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.</p> <dl> <dt id="Encode::CN-Continental-China"><a class="permalink" href="#Encode::CN-Continental-China">#</a><a id="Encode2"></a><a id="Encode::CN----Continental-China"></a>Encode::CN -- Continental China</dt> <dd> <pre><code class="plaintext">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 ---------------------------------------------------------------- [1] GB2312 is aliased to this. See L<Microsoft-related naming mess> [2] gbk is aliased to this. See L<Microsoft-related naming mess></code></pre> </dd> <dt id="Encode::JP-Japan"><a class="permalink" href="#Encode::JP-Japan">#</a><a id="Encode3"></a><a id="Encode::JP----Japan"></a>Encode::JP -- Japan</dt> <dd> <pre><code class="plaintext">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 } ----------------------------------------------------------------</code></pre> </dd> <dt id="Encode::KR-Korea"><a class="permalink" href="#Encode::KR-Korea">#</a><a id="Encode4"></a><a id="Encode::KR----Korea"></a>Encode::KR -- Korea</dt> <dd> <pre><code class="plaintext">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 } ---------------------------------------------------------------- [1] ks_c_5601-1987, (x-)?windows-949, and uhc are aliased to this. See below.</code></pre> </dd> <dt id="Encode::TW-Taiwan"><a class="permalink" href="#Encode::TW-Taiwan">#</a><a id="Encode5"></a><a id="Encode::TW----Taiwan"></a>Encode::TW -- Taiwan</dt> <dd> <pre><code class="plaintext">Standard DOS/Win Macintosh Comment/Reference ---------------------------------------------------------------- big5-eten cp950 MacChineseTrad {big5 aliased to big5-eten} big5-hkscs ----------------------------------------------------------------</code></pre> </dd> <dt id="Encode::HanExtra-More-Chinese-via-CPAN"><a class="permalink" href="#Encode::HanExtra-More-Chinese-via-CPAN">#</a><a id="Encode6"></a><a id="Encode::HanExtra----More-Chinese-via-CPAN"></a>Encode::HanExtra -- More Chinese via CPAN</dt> <dd> <p>Due to the size concerns, additional Chinese encodings below are distributed separately on CPAN, under the name Encode::HanExtra.</p> <pre><code class="plaintext">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 ----------------------------------------------------------------</code></pre> </dd> <dt id="Encode::JIS2K-JIS-X-0213-encodings-via-CPAN"><a class="permalink" href="#Encode::JIS2K-JIS-X-0213-encodings-via-CPAN">#</a><a id="Encode7"></a><a id="Encode::JIS2K----JIS-X-0213-encodings-via-CPAN"></a>Encode::JIS2K -- JIS X 0213 encodings via CPAN</dt> <dd> <p>Due to size concerns, additional Japanese encodings below are distributed separately on CPAN, under the name Encode::JIS2K.</p> <pre><code class="plaintext">Standard DOS/Win Macintosh Comment/Reference ---------------------------------------------------------------- euc-jisx0213 shiftjisx0123 iso-2022-jp-3 jis0213-1-raw jis0213-2-raw ----------------------------------------------------------------</code></pre> </dd> </dl> <h2 id="Miscellaneous-encodings"><a class="permalink" href="#Miscellaneous-encodings">#</a><a id="Miscellaneous"></a>Miscellaneous encodings</h2> <dl> <dt id="Encode::EBCDIC"><a class="permalink" href="#Encode::EBCDIC">#</a><a id="Encode8"></a>Encode::EBCDIC</dt> <dd> <p>See <a href="/5.30.3/perlebcdic">perlebcdic</a> for details.</p> <pre><code class="plaintext">---------------------------------------------------------------- cp37 cp500 cp875 cp1026 cp1047 posix-bc ----------------------------------------------------------------</code></pre> </dd> <dt id="Encode::Symbols"><a class="permalink" href="#Encode::Symbols">#</a><a id="Encode9"></a>Encode::Symbols</dt> <dd> <p>For symbols and dingbats.</p> <pre><code class="plaintext">---------------------------------------------------------------- symbol dingbats MacDingbats AdobeZdingbat AdobeSymbol ----------------------------------------------------------------</code></pre> </dd> <dt id="Encode::MIME::Header"><a class="permalink" href="#Encode::MIME::Header">#</a><a id="Encode10"></a>Encode::MIME::Header</dt> <dd> <p>Strictly speaking, MIME header encoding documented in RFC 2047 is more of encapsulation than encoding. However, their support in modern world is imperative so they are supported.</p> <pre><code class="plaintext">---------------------------------------------------------------- MIME-Header [RFC2047] MIME-B [RFC2047] MIME-Q [RFC2047] ----------------------------------------------------------------</code></pre> </dd> <dt id="Encode::Guess"><a class="permalink" href="#Encode::Guess">#</a><a id="Encode11"></a>Encode::Guess</dt> <dd> <p>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 <i>suspects</i>. See <a href="/5.30.3/Encode::Guess">Encode::Guess</a> for details.</p> </dd> </dl> <h1 id="Unsupported-encodings"><a class="permalink" href="#Unsupported-encodings">#</a><a id="Unsupported"></a>Unsupported encodings</h1> <p>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 CPAN in the future, however.</p> <dl> <dt id="ISO-2022-JP-2-[RFC1554]"><a class="permalink" href="#ISO-2022-JP-2-%5BRFC1554%5D">#</a><a id="ISO2"></a><a id="ISO-2022-JP-2-RFC1554"></a>ISO-2022-JP-2 [RFC1554]</dt> <dd> <p>Not very popular yet. Needs Unicode Database or equivalent to implement encode() (because it includes JIS X 0208/0212, KSC5601, and GB2312 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).</p> </dd> <dt id="ISO-2022-CN-[RFC1922]"><a class="permalink" href="#ISO-2022-CN-%5BRFC1922%5D">#</a><a id="ISO3"></a><a id="ISO-2022-CN-RFC1922"></a>ISO-2022-CN [RFC1922]</dt> <dd> <p>Not very popular. Needs CNS 11643-1 and -2 which are not available in this module. CNS 11643 is supported (via euc-tw) in Encode::HanExtra. Audrey Tang may add support for this encoding in her module in future.</p> </dd> <dt id="Various-HP-UX-encodings"><a class="permalink" href="#Various-HP-UX-encodings">#</a><a id="Various"></a>Various HP-UX encodings</dt> <dd> <p>The following are unsupported due to the lack of mapping data.</p> <pre><code class="plaintext">'8' - arabic8, greek8, hebrew8, kana8, thai8, and turkish8 '15' - japanese15, korean15, and roi15</code></pre> </dd> <dt id="Cyrillic-encoding-ISO-IR-111"><a class="permalink" href="#Cyrillic-encoding-ISO-IR-111">#</a><a id="Cyrillic"></a>Cyrillic encoding ISO-IR-111</dt> <dd> <p>Anton Tagunov doubts its usefulness.</p> </dd> <dt id="ISO-8859-8-1-[Hebrew]"><a class="permalink" href="#ISO-8859-8-1-%5BHebrew%5D">#</a><a id="ISO4"></a><a id="ISO-8859-8-1-Hebrew"></a>ISO-8859-8-1 [Hebrew]</dt> <dd> <p>None of the Encode team knows Hebrew enough (ISO-8859-8, cp1255 and MacHebrew are supported because and just because there were mappings available at <a href="http://www.unicode.org/">http://www.unicode.org/</a>). Contributions welcome.</p> </dd> <dt id="ISIRI-3342,-Iran-System,-ISIRI-2900-[Farsi]"><a class="permalink" href="#ISIRI-3342,-Iran-System,-ISIRI-2900-%5BFarsi%5D">#</a><a id="ISIRI"></a><a id="ISIRI-3342-Iran-System-ISIRI-2900-Farsi"></a>ISIRI 3342, Iran System, ISIRI 2900 [Farsi]</dt> <dd> <p>Ditto.</p> </dd> <dt id="Thai-encoding-TCVN"><a class="permalink" href="#Thai-encoding-TCVN">#</a><a id="Thai"></a>Thai encoding TCVN</dt> <dd> <p>Ditto.</p> </dd> <dt id="Vietnamese-encodings-VPS"><a class="permalink" href="#Vietnamese-encodings-VPS">#</a><a id="Vietnamese"></a>Vietnamese encodings VPS</dt> <dd> <p>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 <a href="http://lxr.mozilla.org/seamonkey/source/intl/uconv/ucvlatin/vps.uf">http://lxr.mozilla.org/seamonkey/source/intl/uconv/ucvlatin/vps.uf</a> and <a href="http://lxr.mozilla.org/seamonkey/source/intl/uconv/ucvlatin/vps.ut">http://lxr.mozilla.org/seamonkey/source/intl/uconv/ucvlatin/vps.ut</a> if you are interested in helping us.</p> </dd> <dt id="Various-Mac-encodings"><a class="permalink" href="#Various-Mac-encodings">#</a><a id="Various1"></a>Various Mac encodings</dt> <dd> <p>The following are unsupported due to the lack of mapping data.</p> <pre><code class="plaintext">MacArmenian, MacBengali, MacBurmese, MacEthiopic MacExtArabic, MacGeorgian, MacKannada, MacKhmer MacLaotian, MacMalayalam, MacMongolian, MacOriya MacSinhalese, MacTamil, MacTelugu, MacTibetan MacVietnamese</code></pre> <p>The rest which are already available are based upon the vendor mappings at <a href="http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/">http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/</a> .</p> </dd> <dt id="(Mac)-Indic-encodings"><a class="permalink" href="#(Mac)-Indic-encodings">#</a><a id="Mac-Indic-encodings"></a>(Mac) Indic encodings</dt> <dd> <p>The maps for the following are available at <a href="http://www.unicode.org/">http://www.unicode.org/</a> but remain unsupported because those encodings need an algorithmical approach, currently unsupported by <i>enc2xs</i>:</p> <pre><code class="plaintext">MacDevanagari MacGurmukhi MacGujarati</code></pre> <p>For details, please see <code>Unicode mapping issues and notes:</code> at <a href="http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/DEVANAGA.TXT">http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/DEVANAGA.TXT</a> .</p> <p>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 <a href="http://www.unicode.org/">http://www.unicode.org/</a> .</p> </dd> </dl> <h1 id="Encoding-vs.-Charset-terminology"><a class="permalink" href="#Encoding-vs.-Charset-terminology">#</a><a id="Encoding1"></a><a id="Encoding-vs.-Charset----terminology"></a>Encoding vs. Charset -- terminology</h1> <p>We are used to using the term (character) <i>encoding</i> and <i>character set</i> interchangeably. But just as confusing the terms byte and character is dangerous and the terms should be differentiated when needed, we need to differentiate <i>encoding</i> and <i>character set</i>.</p> <p>To understand that, here is a description of how we make computers grok our characters.</p> <ul> <li><p>First we start with which characters to include. We call this collection of characters <i>character repertoire</i>.</p> </li> <li><p>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 <i>character set</i>.</p> </li> <li><p>If your computer can grow the character set without further processing, you can go ahead and use it. This is called a <i>coded character set</i> (CCS) or <i>raw character encoding</i>. ASCII is used this way for most cases.</p> </li> <li><p>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 <i>encode</i> the character set to use it.</p> <p>A <i>character encoding scheme</i> (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 <i>escape sequences</i>.</p> </li> </ul> <p>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 is as follows:</p> <ul> <li><p>Map ASCII unchanged.</p> </li> <li><p>Map such a character set that consists of 94 or 96 powered by N members by adding 0x80 to each byte.</p> </li> <li><p>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.</p> </li> </ul> <p>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?). UTF-8 falls into this category. See <a href="/5.30.3/perlUnicode#UTF-8">"UTF-8" in perlUnicode</a> to find out how UTF-8 maps Unicode to a byte sequence.</p> <p>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 is two !'s or IDEOGRAPHIC SPACE. EUC maps the latter to \xA1\xA1 so you have no trouble differentiating between "!!". and <span style="white-space: nowrap;">" "</span>.</p> <h1 id="Encoding-Classification-(by-Anton-Tagunov-and-Dan-Kogai)"><a class="permalink" href="#Encoding-Classification-(by-Anton-Tagunov-and-Dan-Kogai)">#</a><a id="Encoding2"></a><a id="Encoding-Classification-by-Anton-Tagunov-and-Dan-Kogai"></a>Encoding Classification (by Anton Tagunov and Dan Kogai)</h1> <p>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.</p> <ul> <li><p>To (en|de)code encodings marked by <code>(**)</code>, you need <code>Encode::HanExtra</code>, available from CPAN.</p> </li> </ul> <p>Encoding names</p> <pre><code class="plaintext">US-ASCII UTF-8 ISO-8859-* KOI8-R Shift_JIS EUC-JP ISO-2022-JP ISO-2022-JP-1 EUC-KR Big5 GB2312</code></pre> <p>are registered with IANA as preferred MIME names and may be used over the Internet.</p> <p><code>Shift_JIS</code> has been officialized by JIS X 0208:1997. <a href="#Microsoft-related-naming-mess">"Microsoft-related naming mess"</a> gives details.</p> <p><code>GB2312</code> is the IANA name for <code>EUC-CN</code>. See <a href="#Microsoft-related-naming-mess">"Microsoft-related naming mess"</a> for details.</p> <p><code>GB_2312-80</code> <i>raw</i> encoding is available as <code>gb2312-raw</code> with Encode. See <a href="/5.30.3/Encode::CN">Encode::CN</a> for details.</p> <pre><code class="plaintext">EUC-CN KOI8-U [RFC2319]</code></pre> <p>have not been registered with IANA (as of March 2002) but seem to be supported by major web browsers. The IANA name for <code>EUC-CN</code> is <code>GB2312</code>.</p> <pre><code class="plaintext">KS_C_5601-1987</code></pre> <p>is heavily misused. See <a href="#Microsoft-related-naming-mess">"Microsoft-related naming mess"</a> for details.</p> <p><code>KS_C_5601-1987</code> <i>raw</i> encoding is available as <code>kcs5601-raw</code> with Encode. See <a href="/5.30.3/Encode::KR">Encode::KR</a> for details.</p> <pre><code class="plaintext">UTF-16 UTF-16BE UTF-16LE</code></pre> <p>are IANA-registered <code>charset</code>s. 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</p> <ul> <li><p><code>UTF-16</code> support in any software you're going to be using/interoperating with has probably been less tested then <code>UTF-8</code> support</p> </li> <li><p><code>UTF-8</code> coded data seamlessly passes traditional command piping (<code>cat</code>, <code>more</code>, etc.) while <code>UTF-16</code> coded data is likely to cause confusion (with its zero bytes, for example)</p> </li> <li><p>it is beyond the power of words to describe the way HTML browsers encode non-<code>ASCII</code> form data. To get a general impression, visit <a href="http://www.alanflavell.org.uk/charset/form-i18n.html">http://www.alanflavell.org.uk/charset/form-i18n.html</a>. While encoding of form data has stabilized for <code>UTF-8</code> encoded pages (at least IE 5/6, NS 6, and Opera 6 behave consistently), be sure to expect fun (and cross-browser discrepancies) with <code>UTF-16</code> encoded pages!</p> </li> </ul> <p>The rule of thumb is to use <code>UTF-8</code> unless you know what you're doing and unless you really benefit from using <code>UTF-16</code>.</p> <pre><code class="plaintext">ISO-IR-165 [RFC1345] VISCII GB 12345 GB 18030 (**) (see links below) EUC-TW (**)</code></pre> <p>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.</p> <pre><code class="plaintext">BIG5PLUS (**)</code></pre> <p>is a proprietary name.</p> <h2 id="Microsoft-related-naming-mess"><a class="permalink" href="#Microsoft-related-naming-mess">#</a><a id="Microsoft"></a>Microsoft-related naming mess</h2> <p>Microsoft products misuse the following names:</p> <dl> <dt id="KS_C_5601-1987"><a class="permalink" href="#KS_C_5601-1987">#</a><a id="KS_C_5601"></a>KS_C_5601-1987</dt> <dd> <p>Microsoft extension to <code>EUC-KR</code>.</p> <p>Proper names: <code>CP949</code>, <code>UHC</code>, <code>x-windows-949</code> (as used by Mozilla).</p> <p>See <a href="http://lists.w3.org/Archives/Public/ietf-charsets/2001AprJun/0033.html">http://lists.w3.org/Archives/Public/ietf-charsets/2001AprJun/0033.html</a> for details.</p> <p>Encode aliases <code>KS_C_5601-1987</code> to <code>cp949</code> to reflect this common misusage. <i>Raw</i> <code>KS_C_5601-1987</code> encoding is available as <code>kcs5601-raw</code>.</p> <p>See <a href="/5.30.3/Encode::KR">Encode::KR</a> for details.</p> </dd> <dt id="GB2312"><a class="permalink" href="#GB2312">#</a>GB2312</dt> <dd> <p>Microsoft extension to <code>EUC-CN</code>.</p> <p>Proper names: <code>CP936</code>, <code>GBK</code>.</p> <p><code>GB2312</code> has been registered in the <code>EUC-CN</code> meaning at IANA. This has partially repaired the situation: Microsoft's <code>GB2312</code> has become a superset of the official <code>GB2312</code>.</p> <p>Encode aliases <code>GB2312</code> to <code>euc-cn</code> in full agreement with IANA registration. <code>cp936</code> is supported separately. <i>Raw</i> <code>GB_2312-80</code> encoding is available as <code>gb2312-raw</code>.</p> <p>See <a href="/5.30.3/Encode::CN">Encode::CN</a> for details.</p> </dd> <dt id="Big5"><a class="permalink" href="#Big5">#</a>Big5</dt> <dd> <p>Microsoft extension to <code>Big5</code>.</p> <p>Proper name: <code>CP950</code>.</p> <p>Encode separately supports <code>Big5</code> and <code>cp950</code>.</p> </dd> <dt id="Shift_JIS"><a class="permalink" href="#Shift_JIS">#</a>Shift_JIS</dt> <dd> <p>Microsoft's understanding of <code>Shift_JIS</code>.</p> <p>JIS has not endorsed the full Microsoft standard however. The official <code>Shift_JIS</code> includes only JIS X 0201 and JIS X 0208 character sets, while Microsoft has always used <code>Shift_JIS</code> to encode a wider character repertoire. See <code>IANA</code> registration for <code>Windows-31J</code>.</p> <p>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.</p> <p>Unambiguous name: <code>CP932</code>. <code>IANA</code> name (also used by Mozilla, and provided as an alias by Encode): <code>Windows-31J</code>.</p> <p>Encode separately supports <code>Shift_JIS</code> and <code>cp932</code>.</p> </dd> </dl> <h1 id="Glossary"><a class="permalink" href="#Glossary">#</a>Glossary</h1> <dl> <dt id="character-repertoire"><a class="permalink" href="#character-repertoire">#</a><a id="character"></a>character repertoire</dt> <dd> <p>A collection of unique characters. A <i>character</i> set in the strictest sense. At this stage, characters are not numbered.</p> </dd> <dt id="coded-character-set-(CCS)"><a class="permalink" href="#coded-character-set-(CCS)">#</a><a id="coded"></a><a id="coded-character-set-CCS"></a>coded character set (CCS)</dt> <dd> <p>A character set that is mapped in a way computers can use directly. Many character encodings, including EUC, fall in this category.</p> </dd> <dt id="character-encoding-scheme-(CES)"><a class="permalink" href="#character-encoding-scheme-(CES)">#</a><a id="character1"></a><a id="character-encoding-scheme-CES"></a>character encoding scheme (CES)</dt> <dd> <p>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.</p> </dd> <dt id="charset-(in-MIME-context)"><a class="permalink" href="#charset-(in-MIME-context)">#</a><a id="charset"></a><a id="charset-in-MIME-context"></a>charset (in MIME context)</dt> <dd> <p>has long been used in the meaning of <code>encoding</code>, CES.</p> <p>While the word combination <code>character set</code> has lost this meaning in MIME context since [RFC 2130], the <code>charset</code> abbreviation has retained it. This is how [RFC 2277] and [RFC 2278] bless <code>charset</code>:</p> <pre><code class="plaintext">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]</code></pre> </dd> <dt id="EUC"><a class="permalink" href="#EUC">#</a>EUC</dt> <dd> <p>Extended Unix Character. See ISO-2022.</p> </dd> <dt id="ISO-2022"><a class="permalink" href="#ISO-2022">#</a><a id="ISO5"></a>ISO-2022</dt> <dd> <p>A CES that was carefully designed to coexist with ASCII. There are a 7 bit version and an 8 bit version.</p> <p>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 <i>de facto</i> standard CES for e-mails.</p> <p>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.</p> </dd> <dt id="UCS"><a class="permalink" href="#UCS">#</a>UCS</dt> <dd> <p>Short for <i>Universal Character Set</i>. When you say just UCS, it means <i>Unicode</i>.</p> </dd> <dt id="UCS-2"><a class="permalink" href="#UCS-2">#</a><a id="UCS1"></a>UCS-2</dt> <dd> <p>ISO/IEC 10646 encoding form: Universal Character Set coded in two octets.</p> </dd> <dt id="Unicode"><a class="permalink" href="#Unicode">#</a>Unicode</dt> <dd> <p>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.</p> </dd> <dt id="UTF"><a class="permalink" href="#UTF">#</a>UTF</dt> <dd> <p>Short for <i>Unicode Transformation Format</i>. Determines how to map a Unicode character into a byte sequence.</p> </dd> <dt id="UTF-16"><a class="permalink" href="#UTF-16">#</a><a id="UTF1"></a>UTF-16</dt> <dd> <p>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.</p> </dd> </dl> <h1 id="See-Also"><a class="permalink" href="#See-Also">#</a><a id="See"></a>See Also</h1> <p><a href="/5.30.3/Encode">Encode</a>, <a href="/5.30.3/Encode::Byte">Encode::Byte</a>, <a href="/5.30.3/Encode::CN">Encode::CN</a>, <a href="/5.30.3/Encode::JP">Encode::JP</a>, <a href="/5.30.3/Encode::KR">Encode::KR</a>, <a href="/5.30.3/Encode::TW">Encode::TW</a>, <a href="/5.30.3/Encode::EBCDIC">Encode::EBCDIC</a>, <a href="/5.30.3/Encode::Symbol">Encode::Symbol</a> <a href="/5.30.3/Encode::MIME::Header">Encode::MIME::Header</a>, <a href="/5.30.3/Encode::Guess">Encode::Guess</a></p> <h1 id="References"><a class="permalink" href="#References">#</a>References</h1> <dl> <dt id="ECMA"><a class="permalink" href="#ECMA">#</a>ECMA</dt> <dd> <p>European Computer Manufacturers Association <a href="http://www.ecma.ch">http://www.ecma.ch</a></p> <dl> <dt id="ECMA-035-(eq-ISO-2022)"><a class="permalink" href="#ECMA-035-(eq-ISO-2022)">#</a><a id="ECMA1"></a><a id="ECMA-035-eq-ISO-2022"></a>ECMA-035 (eq <code>ISO-2022</code>)</dt> <dd> <p><a href="http://www.ecma.ch/ecma1/STAND/ECMA-035.HTM">http://www.ecma.ch/ecma1/STAND/ECMA-035.HTM</a></p> <p>The specification of ISO-2022 is available from the link above.</p> </dd> </dl> </dd> <dt id="IANA"><a class="permalink" href="#IANA">#</a>IANA</dt> <dd> <p>Internet Assigned Numbers Authority <a href="http://www.iana.org/">http://www.iana.org/</a></p> <dl> <dt id="Assigned-Charset-Names-by-IANA"><a class="permalink" href="#Assigned-Charset-Names-by-IANA">#</a><a id="Assigned"></a>Assigned Charset Names by IANA</dt> <dd> <p><a href="http://www.iana.org/assignments/character-sets">http://www.iana.org/assignments/character-sets</a></p> <p>Most of the <code>canonical names</code> in Encode derive from this list so you can directly apply the string you have extracted from MIME header of mails and web pages.</p> </dd> </dl> </dd> <dt id="ISO"><a class="permalink" href="#ISO">#</a>ISO</dt> <dd> <p>International Organization for Standardization <a href="http://www.iso.ch/">http://www.iso.ch/</a></p> </dd> <dt id="RFC"><a class="permalink" href="#RFC">#</a>RFC</dt> <dd> <p>Request For Comments -- need I say more? <a href="http://www.rfc-editor.org/">http://www.rfc-editor.org/</a>, <a href="http://www.ietf.org/rfc.html">http://www.ietf.org/rfc.html</a>, <a href="http://www.faqs.org/rfcs/">http://www.faqs.org/rfcs/</a></p> </dd> <dt id="UC"><a class="permalink" href="#UC">#</a>UC</dt> <dd> <p>Unicode Consortium <a href="http://www.unicode.org/">http://www.unicode.org/</a></p> <dl> <dt id="Unicode-Glossary"><a class="permalink" href="#Unicode-Glossary">#</a><a id="Unicode1"></a>Unicode Glossary</dt> <dd> <p><a href="http://www.unicode.org/glossary/">http://www.unicode.org/glossary/</a></p> <p>The glossary of this document is based upon this site.</p> </dd> </dl> </dd> </dl> <h2 id="Other-Notable-Sites"><a class="permalink" href="#Other-Notable-Sites">#</a><a id="Other"></a>Other Notable Sites</h2> <dl> <dt id="czyborra.com"><a class="permalink" href="#czyborra.com">#</a><a id="czyborra"></a>czyborra.com</dt> <dd> <p><a href="http://czyborra.com/">http://czyborra.com/</a></p> <p>Contains a lot of useful information, especially gory details of ISO vs. vendor mappings.</p> </dd> <dt id="CJK.inf"><a class="permalink" href="#CJK.inf">#</a><a id="CJK1"></a>CJK.inf</dt> <dd> <p><a href="http://examples.oreilly.com/cjkvinfo/doc/cjk.inf">http://examples.oreilly.com/cjkvinfo/doc/cjk.inf</a></p> <p>Somewhat obsolete (last update in 1996), but still useful. Also try</p> <p><a href="ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/pdf/GB18030_Summary.pdf">ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv/pdf/GB18030_Summary.pdf</a></p> <p>You will find brief info on <code>EUC-CN</code>, <code>GBK</code> and mostly on <code>GB 18030</code>.</p> </dd> <dt id="Jungshik-Shin's-Hangul-FAQ"><a class="permalink" href="#Jungshik-Shin's-Hangul-FAQ">#</a><a id="Jungshik"></a><a id="Jungshik-Shins-Hangul-FAQ"></a>Jungshik Shin's Hangul FAQ</dt> <dd> <p><a href="http://jshin.net/faq">http://jshin.net/faq</a></p> <p>And especially its subject 8.</p> <p><a href="http://jshin.net/faq/qa8.html">http://jshin.net/faq/qa8.html</a></p> <p>A comprehensive overview of the Korean (<code>KS *</code>) standards.</p> </dd> <dt id="debian.org:-"Introduction-to-i18n""><a class="permalink" href="#debian.org:-%22Introduction-to-i18n%22">#</a><a id="debian"></a><a id="debian.org:-Introduction-to-i18n"></a>debian.org: "Introduction to i18n"</dt> <dd> <p>A brief description for most of the mentioned CJK encodings is contained in <a href="http://www.debian.org/doc/manuals/intro-i18n/ch-codes.en.html">http://www.debian.org/doc/manuals/intro-i18n/ch-codes.en.html</a></p> </dd> </dl> <h2 id="Offline-sources"><a class="permalink" href="#Offline-sources">#</a><a id="Offline"></a>Offline sources</h2> <dl> <dt id="CJKV-Information-Processing-by-Ken-Lunde"><a class="permalink" href="#CJKV-Information-Processing-by-Ken-Lunde">#</a><a id="CJKV"></a><code>CJKV Information Processing</code> by Ken Lunde</dt> <dd> <p>CJKV Information Processing 1999 O'Reilly & Associates, ISBN : 1-56592-224-7</p> <p>The modern successor of <code>CJK.inf</code>.</p> <p>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.</p> <p>To purchase this book, visit <a href="http://oreilly.com/catalog/9780596514471/">http://oreilly.com/catalog/9780596514471/</a> or your favourite bookstore.</p> </dd> </dl> </div> <div id="footer"> <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p> <p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script> <script src="/js/highlight.pack.js"></script> <script>hljs.highlightAll();</script> </body> </html>