{
    "mode": "perldoc",
    "parameter": "Encode::JP",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Encode%3A%3AJP/json",
    "generated": "2026-06-03T07:32:53Z",
    "synopsis": "use Encode qw/encode decode/;\n$eucjp = encode(\"euc-jp\", $utf8);   # loads Encode::JP implicitly\n$utf8   = decode(\"euc-jp\", $eucjp); # ditto",
    "sections": {
        "NAME": {
            "content": "Encode::JP - Japanese Encodings\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Encode qw/encode decode/;\n$eucjp = encode(\"euc-jp\", $utf8);   # loads Encode::JP implicitly\n$utf8   = decode(\"euc-jp\", $eucjp); # ditto\n",
            "subsections": []
        },
        "ABSTRACT": {
            "content": "This module implements Japanese charset encodings. Encodings supported are as follows.\n\nCanonical   Alias             Description\n--------------------------------------------------------------------\neuc-jp      /\\beuc.*jp$/i     EUC (Extended Unix Character)\n/\\bjp.*euc/i\n/\\bujis$/i\nshiftjis    /\\bshift.*jis$/i  Shift JIS (aka MS Kanji)\n/\\bsjis$/i\n7bit-jis    /\\bjis$/i         7bit JIS\niso-2022-jp                   ISO-2022-JP                  [RFC1468]\n= 7bit JIS with all Halfwidth Kana\nconverted to Fullwidth\niso-2022-jp-1                 ISO-2022-JP-1                [RFC2237]\n= ISO-2022-JP with JIS X 0212-1990\nsupport.  See below\nMacJapanese                   Shift JIS + Apple vendor mappings\ncp932       /\\bwindows-31j$/i Code Page 932\n= Shift JIS + MS/IBM vendor mappings\njis0201-raw                   JIS0201, raw format\njis0208-raw                   JIS0208, raw format\njis0212-raw                   JIS0212, raw format\n--------------------------------------------------------------------\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "To find out how to use this module in detail, see Encode.\n\nNote on ISO-2022-JP(-1)?\nISO-2022-JP-1 (RFC2237) is a superset of ISO-2022-JP (RFC1468) which adds support for JIS X\n0212-1990. That means you can use the same code to decode to utf8 but not vice versa.\n\n$utf8 = decode('iso-2022-jp-1', $stream);\n\nand\n\n$utf8 = decode('iso-2022-jp',   $stream);\n\nyield the same result but\n\n$with0212 = encode('iso-2022-jp-1', $utf8);\n\nis now different from\n\n$without0212 = encode('iso-2022-jp', $utf8 );\n\nIn the latter case, characters that map to 0212 are first converted to U+3013 (0xA2AE in EUC-JP;\na white square also known as 'Tofu' or 'geta mark') then fed to the decoding engine. U+FFFD is\nnot used, in order to preserve text layout as much as possible.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "The 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::JP - Japanese Encodings",
    "flags": [],
    "examples": [],
    "see_also": []
}