{
    "content": [
        {
            "type": "text",
            "text": "# Encode::JP (perldoc)\n\n**Summary:** Encode::JP - Japanese Encodings\n\n**Synopsis:** use Encode qw/encode decode/;\n$eucjp = encode(\"euc-jp\", $utf8);   # loads Encode::JP implicitly\n$utf8   = decode(\"euc-jp\", $eucjp); # ditto\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **ABSTRACT** (24 lines)\n- **DESCRIPTION** (24 lines)\n- **BUGS** (3 lines)\n- **SEE ALSO** (2 lines)\n\n## Full Content\n\n### NAME\n\nEncode::JP - Japanese Encodings\n\n### SYNOPSIS\n\nuse Encode qw/encode decode/;\n$eucjp = encode(\"euc-jp\", $utf8);   # loads Encode::JP implicitly\n$utf8   = decode(\"euc-jp\", $eucjp); # ditto\n\n### ABSTRACT\n\nThis 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\n### DESCRIPTION\n\nTo 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\n### BUGS\n\nThe ASCII region (0x00-0x7f) is preserved for all encodings, even though this conflicts with\nmappings by the Unicode Consortium.\n\n### SEE ALSO\n\nEncode\n\n"
        }
    ],
    "structuredContent": {
        "command": "Encode::JP",
        "section": "",
        "mode": "perldoc",
        "summary": "Encode::JP - Japanese Encodings",
        "synopsis": "use Encode qw/encode decode/;\n$eucjp = encode(\"euc-jp\", $utf8);   # loads Encode::JP implicitly\n$utf8   = decode(\"euc-jp\", $eucjp); # ditto",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "ABSTRACT",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "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": []
            }
        }
    }
}