Encode::CN - China-based Chinese Encodings
use Encode qw/encode decode/; $euc_cn = encode("euc-cn", $utf8); # loads Encode::CN implicitly$utf8 = decode("euc-cn", $euc_cn); # dittoThis module implements China-based Chinese charset encodings. Encodings supported are as follows.
Canonical AliasDescription -------------------------------------------------------------------- euc-cn /\beuc.*cn$/iEUC (Extended Unix Character) /\bcn.*euc$/i /\bGB[-_ ]?2312(?:\D.*$|$)/i (see below) gb2312-rawThe raw (low-bit) GB2312 character map gb12345-rawTraditional chinese counterpart to GB2312 (raw) iso-ir-165GB2312 + GB6345 + GB8565 + additions MacChineseSimp GB2312 + Apple Additions cp936Code Page 936, also known as GBK (Extended GuoBiao) hz7-bit escaped GB2312 encoding --------------------------------------------------------------------To find how to use this module in detail, seeEncode.
Due to size concerns,GB 18030 (an extension toGBK) is distributed separately on CPAN, under the nameEncode::HanExtra. That module also contains extra Taiwan-based encodings.
When you seecharset=gb2312 on mails and web pages, they really meaneuc-cn encodings. To fix that,gb2312 is aliased toeuc-cn. Usegb2312-raw when you really mean it.
The ASCII region (0x00-0x7f) is preserved for all encodings, even though this conflicts with mappings by the Unicode Consortium. See
http://www.debian.or.jp/~kubota/unicode-symbols.html.en
to find out why it is implemented that way.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.