Encode::HanExtra(3)
π Encode::HanExtra: Extra sets of Chinese encodings π
okay bestie, welcome to the Encode::HanExtra(3) page β itβs literally the extra Chinese encodings manual, and weβre gonna get through it together. π«Άβ¨
πΈ NAME πΈ
Encode::HanExtra β Extra sets of Chinese encodings
β¨ VERSION β¨
This document describes version 0.23 of Encode::HanExtra, released November 10, 2007. π
π¦ SYNOPSIS π¦
okay so hereβs the vibe in code form, no cap:
use Encode;
# Traditional Chinese
$euc_tw = encode("euc-tw", $utf8); # loads Encode::HanExtra implicitly
$utf8 = decode("euc-tw", $euc_tw); # ditto
# Simplified Chinese
$gb18030 = encode("gb18030", $utf8); # loads Encode::HanExtra implicitly
$utf8 = decode("gb18030", $gb18030); # ditto
π DESCRIPTION π
so Perl 5.7.3 and later ships with an adequate set of Chinese encodings, including the commonly used CP950, CP936 (also known as GBK), Big5 (alias for Big5-Eten), Big5-HKSCS, EUC-CN, HZ, and ISO-IR-165. π
but bestie, the numbers of Chinese encodings are staggering, and a complete coverage will easily increase the size of the perl distribution by several megabytes β so this CPAN module tries to provide the rest of them. π
if youβre using Perl 5.8 or later, Encode::CN and Encode::TW will automatically load the extra encodings for you, so thereβs no need to explicitly write use Encode::HanExtra if you are using one of them already. π«Ά
π ENCODINGS π
this version includes the following encoding tables, bestie β canonical name, alias regex, description, all present and accounted for:
big5-1984β alias:/\b(tca-)?big5-?(19)?84$/iβ TCA's original Big5-1984big5-2003β alias:/\b(cmex-)?big5-?(20)?03$/iβ Big5-2003 (national standard)big5extβ alias:/\b(cmex-)?big5-?e(xt)?$/iβ CMEX's Big5e Extensionbig5plusβ aliases:/\b(cmex-)?big5-?p(lus)?$/iand/\b(cmex-)?big5\+$/iβ CMEX's Big5+ Extensionccciiβ alias:/\b(ccag-)?cccii$/iβ Chinese Character Code for Information Interchangecns11643-1β alias:/\bCNS[-_ ]?11643[-_]1$/iβ Taiwan's CNS map, plane 1cns11643-2β alias:/\bCNS[-_ ]?11643[-_]2$/iβ Taiwan's CNS map, plane 2cns11643-3β alias:/\bCNS[-_ ]?11643[-_]3$/iβ Taiwan's CNS map, plane 3cns11643-4β alias:/\bCNS[-_ ]?11643[-_]4$/iβ Taiwan's CNS map, plane 4cns11643-5β alias:/\bCNS[-_ ]?11643[-_]5$/iβ Taiwan's CNS map, plane 5cns11643-6β alias:/\bCNS[-_ ]?11643[-_]6$/iβ Taiwan's CNS map, plane 6cns11643-7β alias:/\bCNS[-_ ]?11643[-_]7$/iβ Taiwan's CNS map, plane 7cns11643-fβ alias:/\bCNS[-_ ]?11643[-_]f$/iβ Taiwan's CNS map, plane Feuc-twβ aliases:/\beuc.*tw$/iand/\btw.*euc$/iβ EUC (Extended Unix Character)gb18030β alias:/\bGB[-_ ]?18030$/iβ GBK with Traditional Charactersunisysβ alias:/\bunisys$/iβ Unisys Traditional Chineseunisys-sosi1β Unisys SOSI1 transport encodingunisys-sosi2β Unisys SOSI2 transport encoding
Detailed descriptions are as follows:
π BIG5-1984 π
This is the original Big5 encoding made by TCA Taiwan.
π BIG5-2003 π
This revised encoding is now national standard, as an appendix of CNS11643.
π§ BIG5PLUS π§
This encoding, while not heavily used, is an attempt to bring all Taiwan's conflicting internal-use encodings together, and fit it as an extension to the widely-deployed Big5 range, by CMEX Taiwan.
π BIG5EXT π
The CMEX's second (and less ambitious) try at unifying the most commonly used characters not covered by Big5, while not polluting out of the 94x94 arragement like BIG5PLUS did.
π CCCII π
The earliest (and most sophisticated) Traditional Chinese encoding, with a three-byte raw character map, made in 1980 by the Chinese Character Analysis Group (CCAG), used mostly in library systems.
β EUC-TW β
The EUC transport version of CNS11643 (planes 1-7), the comprehensive character set used by the Taiwan government.
πΈ CNS11643-* πΈ
The raw character map extracted from the Unihan database, including the plane F which wasn't included in EUC-TW.
π₯ GB18030 π₯
An extension to GBK, this encoding lists most Han characters (both simplified and traditional), as well as some other encodings used by other peoples in China.
π«Ά UNISYS π«Ά
Unisys System's internal Chinese mapping.
π NOTES π
if youβre looking for ways to transliterate between Simplified and Traditional Chinese, please take a look at Encode::HanConvert. note that the direct mapping via Unicode is lossy, and usually doesn't work at all. π
please send me suggestions if you want to see more encoding added, such as BIG5-GCCS (superseded by BIG5-HKSCS). other suggestions are welcome, too. π«Ά
π SEE ALSO π
EncodeEncode::HanConvert
π ACKNOWLEDGEMENTS π
some of the maps here are generated from GNU libiconv's test files, with kind permission from Bruno Haible. π
map for BIG5PLUS is generated from the BIG52UCS.TXT file, courtesy of CMEX Taiwan (Chinese Microcomputer Extended Foundation, <http://www.cmex.org.tw/>). πΈ
map for BIG5-1984 is supplied by imacat. map for CCCII is supplied by the Koha Taiwan project. π
βοΈ AUTHORS βοΈ
Audrey Tang <audreyt@audreyt.org>
Β©οΈ COPYRIGHT Β©οΈ
Copyright 2002-2007 by Audrey Tang <audreyt@audreyt.org>.
This software is released under the MIT license cited below.
π The "MIT" License π
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
okay bestie, thatβs the whole Encode::HanExtra(3) page β this copy says perl v5.42.0 and 2024-03-04 at the bottom, so thatβs the source/version + date energy. mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Encode-HanExtra 0.23-160000.2.2 Β· MIT
- opensuse-leap 16.0: perl-Encode-HanExtra 0.23-160000.2.2 Β· MIT
- opensuse-leap 16.0: perl-Encode-HanExtra 0.23-160000.2.2 Β· MIT
- opensuse-leap 16.0: perl-Encode-HanExtra 0.23-160000.2.2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms