{
    "content": [
        {
            "type": "text",
            "text": "# URI::_punycode (perldoc)\n\n## NAME\n\nURI::punycode - encodes Unicode string in Punycode\n\n## SYNOPSIS\n\nuse strict;\nuse warnings;\nuse utf8;\nuse URI::punycode qw(encodepunycode decodepunycode);\n# encode a unicode string\nmy $punycode = encodepunycode('http://☃.net'); # http://.net-xc8g\n$punycode = encodepunycode('bücher'); # bcher-kva\n$punycode = encodepunycode('他们为什么不说中文'); # ihqwcrb4cv8a8dqg056pqjye\n# decode a punycode string back into a unicode string\nmy $unicode = decodepunycode('http://.net-xc8g'); # http://☃.net\n$unicode = decodepunycode('bcher-kva'); # bücher\n$unicode = decodepunycode('ihqwcrb4cv8a8dqg056pqjye'); # 他们为什么不说中文\n\n## DESCRIPTION\n\nURI::punycode is a module to encode / decode Unicode strings into Punycode\n<https://tools.ietf.org/html/rfc3492>, an efficient encoding of Unicode for use with IDNA\n<https://tools.ietf.org/html/rfc5890>.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **FUNCTIONS**\n- **AUTHOR**\n- **SEE ALSO**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "URI::_punycode",
        "section": "",
        "mode": "perldoc",
        "summary": "URI::punycode - encodes Unicode string in Punycode",
        "synopsis": "use strict;\nuse warnings;\nuse utf8;\nuse URI::punycode qw(encodepunycode decodepunycode);\n# encode a unicode string\nmy $punycode = encodepunycode('http://☃.net'); # http://.net-xc8g\n$punycode = encodepunycode('bücher'); # bcher-kva\n$punycode = encodepunycode('他们为什么不说中文'); # ihqwcrb4cv8a8dqg056pqjye\n# decode a punycode string back into a unicode string\nmy $unicode = decodepunycode('http://.net-xc8g'); # http://☃.net\n$unicode = decodepunycode('bcher-kva'); # bücher\n$unicode = decodepunycode('ihqwcrb4cv8a8dqg056pqjye'); # 他们为什么不说中文",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "URI::punycode - encodes Unicode string in Punycode\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use strict;\nuse warnings;\nuse utf8;\n\nuse URI::punycode qw(encodepunycode decodepunycode);\n\n# encode a unicode string\nmy $punycode = encodepunycode('http://☃.net'); # http://.net-xc8g\n$punycode = encodepunycode('bücher'); # bcher-kva\n$punycode = encodepunycode('他们为什么不说中文'); # ihqwcrb4cv8a8dqg056pqjye\n\n# decode a punycode string back into a unicode string\nmy $unicode = decodepunycode('http://.net-xc8g'); # http://☃.net\n$unicode = decodepunycode('bcher-kva'); # bücher\n$unicode = decodepunycode('ihqwcrb4cv8a8dqg056pqjye'); # 他们为什么不说中文\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "URI::punycode is a module to encode / decode Unicode strings into Punycode\n<https://tools.ietf.org/html/rfc3492>, an efficient encoding of Unicode for use with IDNA\n<https://tools.ietf.org/html/rfc5890>.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "All functions throw exceptions on failure. You can \"catch\" them with Syntax::Keyword::Try or\nTry::Tiny. The following functions are exported by default.\n\nencodepunycode\nmy $punycode = encodepunycode('http://☃.net');  # http://.net-xc8g\n$punycode = encodepunycode('bücher'); # bcher-kva\n$punycode = encodepunycode('他们为什么不说中文') # ihqwcrb4cv8a8dqg056pqjye\n\nTakes a Unicode string (UTF8-flagged variable) and returns a Punycode encoding for it.\n\ndecodepunycode\nmy $unicode = decodepunycode('http://.net-xc8g'); # http://☃.net\n$unicode = decodepunycode('bcher-kva'); # bücher\n$unicode = decodepunycode('ihqwcrb4cv8a8dqg056pqjye'); # 他们为什么不说中文\n\nTakes a Punycode encoding and returns original Unicode string.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Tatsuhiko Miyagawa <miyagawa@bulknews.net> is the author of IDNA::Punycode which was the basis\nfor this module.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "IDNA::Punycode, RFC 3492 <https://tools.ietf.org/html/rfc3492>, RFC 5891\n<https://tools.ietf.org/html/rfc5891>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            }
        }
    }
}