{
    "mode": "perldoc",
    "parameter": "URI::_punycode",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/URI%3A%3A_punycode/json",
    "generated": "2026-05-30T19:08:57Z",
    "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'); # 他们为什么不说中文",
    "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\nPunycode <https://tools.ietf.org/html/rfc3492>, an efficient encoding of\nUnicode for use with IDNA <https://tools.ietf.org/html/rfc5890>.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "All functions throw exceptions on failure. You can \"catch\" them with\nSyntax::Keyword::Try or Try::Tiny. The following functions are exported\nby 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\nencoding 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\nIDNA::Punycode which was the basis for 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\nunder the same terms as Perl itself.\n",
            "subsections": []
        }
    },
    "summary": "URI::punycode - encodes Unicode string in Punycode",
    "flags": [],
    "examples": [],
    "see_also": []
}