{
    "mode": "perldoc",
    "parameter": "Encode::CN",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Encode%3A%3ACN/json",
    "generated": "2026-06-12T05:49:42Z",
    "synopsis": "use Encode qw/encode decode/;\n$euccn = encode(\"euc-cn\", $utf8);   # loads Encode::CN implicitly\n$utf8   = decode(\"euc-cn\", $euccn); # ditto",
    "sections": {
        "NAME": {
            "content": "Encode::CN - China-based Chinese Encodings\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Encode qw/encode decode/;\n$euccn = encode(\"euc-cn\", $utf8);   # loads Encode::CN implicitly\n$utf8   = decode(\"euc-cn\", $euccn); # ditto\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module implements China-based Chinese charset encodings. Encodings supported are as\nfollows.\n\nCanonical   Alias             Description\n--------------------------------------------------------------------\neuc-cn      /\\beuc.*cn$/i     EUC (Extended Unix Character)\n/\\bcn.*euc$/i\n/\\bGB[- ]?2312(?:\\D.*$|$)/i (see below)\ngb2312-raw                    The raw (low-bit) GB2312 character map\ngb12345-raw                   Traditional chinese counterpart to\nGB2312 (raw)\niso-ir-165                    GB2312 + GB6345 + GB8565 + additions\nMacChineseSimp                GB2312 + Apple Additions\ncp936                         Code Page 936, also known as GBK\n(Extended GuoBiao)\nhz                            7-bit escaped GB2312 encoding\n--------------------------------------------------------------------\n\nTo find how to use this module in detail, see Encode.\n",
            "subsections": []
        },
        "NOTES": {
            "content": "Due to size concerns, \"GB 18030\" (an extension to \"GBK\") is distributed separately on CPAN,\nunder the name Encode::HanExtra. That module also contains extra Taiwan-based encodings.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "When you see \"charset=gb2312\" on mails and web pages, they really mean \"euc-cn\" encodings. To\nfix that, \"gb2312\" is aliased to \"euc-cn\". Use \"gb2312-raw\" when you really mean it.\n\nThe ASCII region (0x00-0x7f) is preserved for all encodings, even though this conflicts with\nmappings by the Unicode Consortium.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Encode\n",
            "subsections": []
        }
    },
    "summary": "Encode::CN - China-based Chinese Encodings",
    "flags": [],
    "examples": [],
    "see_also": []
}