{
    "content": [
        {
            "type": "text",
            "text": "# Net::IDN::Encode (info)\n\n## NAME\n\nNet::IDN::Encode - Internationalizing Domain Names in Applications (IDNA)\n\n## SYNOPSIS\n\nuse Net::IDN::Encode ':all';\nmy $a = domaintoascii(\"mueller.example.org\");\nmy $e = emailtoascii(\"POSTMASTER@XXXXX\");\nmy $u = domaintounicode('EXAMPLE.XN--11B5BS3A9AJ6G');\n\n## DESCRIPTION\n\nThis module provides an easy-to-use interface for encoding and decoding\nInternationalized Domain Names (IDNs).\n\n## Sections\n\n- **Net::IDN::Encode(3pm) User Contributed Perl DocumentationNet::IDN::Encode(3pm)**\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **UNICODE VERSION**\n- **FUNCTIONS**\n- **AUTHOR**\n- **LICENSE**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::IDN::Encode",
        "section": "",
        "mode": "info",
        "summary": "Net::IDN::Encode - Internationalizing Domain Names in Applications (IDNA)",
        "synopsis": "use Net::IDN::Encode ':all';\nmy $a = domaintoascii(\"mueller.example.org\");\nmy $e = emailtoascii(\"POSTMASTER@XXXXX\");\nmy $u = domaintounicode('EXAMPLE.XN--11B5BS3A9AJ6G');",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "Encode",
                "section": "3pm",
                "url": "https://www.chedong.com/phpMan.php/man/Encode/3pm/json"
            }
        ],
        "section_outline": [
            {
                "name": "Net::IDN::Encode(3pm) User Contributed Perl DocumentationNet::IDN::Encode(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "UNICODE VERSION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 153,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "Net::IDN::Encode(3pm) User Contributed Perl DocumentationNet::IDN::Encode(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Net::IDN::Encode - Internationalizing Domain Names in Applications\n(IDNA)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Net::IDN::Encode ':all';\nmy $a = domaintoascii(\"mueller.example.org\");\nmy $e = emailtoascii(\"POSTMASTER@XXXXX\");\nmy $u = domaintounicode('EXAMPLE.XN--11B5BS3A9AJ6G');\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides an easy-to-use interface for encoding and decoding\nInternationalized Domain Names (IDNs).\n\nIDNs use characters drawn from a large repertoire (Unicode), but IDNA\nallows the non-ASCII characters to be represented using only the ASCII\ncharacters already allowed in so-called host names today (letter-digit-\nhyphen, \"/[A-Z0-9-]/i\").\n\nUse this module if you just want to convert domain names (or email\naddresses), using whatever IDNA standard is the best choice at the\nmoment.\n\nYou should be familiar with Unicode support in perl, as this module\nexpects correctly encoded input. See perlunitut, perluniintro and\nperlunicode for details.\n",
                "subsections": []
            },
            "UNICODE VERSION": {
                "content": "To convert labels correctly between Unicode and ASCII, each character\nin the label must be present in the Unicode version supported by your\nperl.  Consequently, this module will refuse to convert labels with new\nUnicode characters on older perl versions (see below).\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "By default, this module does not export any subroutines. You may use\nthe \":all\" tag to import everything. You can also use regular\nexpressions such as \"/^to/\" or \"/^email/\" to select some of the\nfunctions, see Exporter for details.\n\nThe following functions are available:\n\ntoascii( $label, %param )\nConverts a single label $label to ASCII. Will throw an exception on\ninvalid input. If $label is already a valid ASCII domain label\n(including most NON-LDH labels such as those used for SRV records\nand fake A-labels), this function will never fail but return $label\nas-is if conversion would fail.\n\nThis function takes the following optional parameters (%param):\n\nAllowUnassigned\n(boolean) If set to a true value, code points that are\nunassigned in the Unicode version supported by your perl are\nallowed. This is an extension over UTS #46.\n\nWhile this increases the number of labels that can be converted\nsuccessfully (especially on older perls) and may thus maximizes\nthe compatibility with domain names created under future\nversions of Unicode, it also introduces the risk of incorrect\nconversions.  Characters added in later versions of Unicode\nmight have properties that affect the conversion; if these\nproperties are not known on your version of perl, you might\ntherefore end up with an incorrect conversion.\n\nThe default is false.\n\nUseSTD3ASCIIRules\n(boolean) If set to a true value, checks the label for\ncompliance with STD 3 (RFC 1123) syntax for host name parts.\nThe exact checks done depend on the IDNA standard used.\nUsually, you will want to set this to true.\n\nPlease note that UseSTD3ASCIIRules only affects the conversion\nbetween ASCII labels (A-labels) and Unicode labels (U-labels).\nLabels that are in ASCII may still be passed-through as-is.\n\nFor historical reasons, the default is false (unlike\n\"domaintoascii\").\n\nTransitionalProcessing\n(boolean) If set to true, the conversion will be compatible\nwith IDNA2003. This only affects four characters: 'ss'\n(U+00DF), 'X' (U+03C2), ZWJ (U+200D) and ZWNJ (U+200C).\nUsually, you will want to set this to false.\n\nThe default is false.\n\nThis function does not handle strings that consist of multiple\nlabels (such as domain names). Use \"domaintoascii\" instead.\n\ntounicode( $label, %param )\nConverts a single label $label to Unicode. Will throw an exception\non invalid input. If $label is an ASCII label (including most NON-\nLDH labels such as those used for SRV records), this function will\nnot fail but return $label as-is if conversion would fail.\n\nThis function takes the same optional parameters as \"toascii\",\nwith the same defaults.\n\nIf $label is already in ASCII, this function will never fail but\nreturn $label as is as a last resort (i.e. pass-through).\n\nThis function takes the following optional parameters (%param):\n\nAllowUnassigned\nUseSTD3ASCIIRules\nSee \"tounicode\" above. Please note that there is no need for\n\"TransitionalProcessing\" for \"tounicode\".\n\nThis function does not handle strings that consist of multiple\nlabels (such as domain names). Use \"domaintounicode\" instead.\n\ndomaintoascii( $label, %param )\nConverts all labels of the hostname $domain (with labels separated\nby dots) to ASCII (using \"toascii\"). Will throw an exception on\ninvalid input.\n\nThis function takes the following optional parameters (%param):\n\nAllowUnassigned\nTransitionalProcessing\nSee \"tounicode\" above.\n\nUseSTD3ASCIIRules\n(boolean) If set to a true value, checks the label for\ncompliance with STD 3 (RFC 1123) syntax for host name parts.\n\nThe default is true (unlike \"toascii\").\n\nThis function will convert all dots to ASCII, i.e. to U+002E (full\nstop). The following characters are recognized as dots: U+002E\n(full stop), U+3002 (ideographic full stop), U+FF0E (fullwidth full\nstop), U+FF61 (halfwidth ideographic full stop).\n\ndomaintounicode( $domain, %param )\nConverts all labels of the hostname $domain (with labels separated\nby dots) to Unicode. Will throw an exception on invalid input.\n\nThis function takes the same optional parameters as\n\"domaintoascii\", with the same defaults.\n\nThis function takes the following optional parameters (%param):\n\nAllowUnassigned\nUseSTD3ASCIIRules\nSee \"domaintounicode\" above. Please note that there is no\n\"TransitionalProcessing\" for \"domaintounicode\".\n\nThis function will preserve the original version of dots.  The\nfollowing characters are recognized as dots: U+002E (full stop),\nU+3002 (ideographic full stop), U+FF0E (fullwidth full stop),\nU+FF61 (halfwidth ideographic full stop).\n\nemailtoascii( $email, %param )\nConverts the domain part (right hand side, separated by an at sign)\nof an RFC 2821/2822 email address to ASCII, using\n\"domaintoascii\". May throw an exception on invalid input.\n\nIt takes the same parameters as \"domaintoascii\".\n\nThis function currently does not handle internationalization of the\nlocal-part (left hand side). Future versions of this module might\nimplement an ASCII conversion for the local-part, should one be\nstandardized.\n\nThis function will convert the at sign to ASCII, i.e. to U+0040\n(commercial at), as well as label separators.  The following\ncharacters are recognized as at signs: U+0040 (commercial at),\nU+FE6B (small commercial at) and U+FF20 (fullwidth commercial at).\n\nemailtounicode( $email, %param )\nConverts the domain part (right hand side, separated by an at sign)\nof an RFC 2821/2822 email address to Unicode, using\n\"domaintounicode\". May throw an exception on invalid input.\n\nIt takes the same parameters as \"domaintounicode\".\n\nThis function currently does not handle internationalization of the\nlocal-part (left hand side).  Future versions of this module might\nimplement a conversion from ASCII for the local-part, should one be\nstandardized.\n\nThis function will preserve the original version of at signs (and\nlabel separators). The following characters are recognized as at\nsigns: U+0040 (commercial at), U+FE6B (small commercial at) and\nU+FF20 (fullwidth commercial at).\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Claus Faerber <CFAERBER@cpan.org>\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyright 2007-2014 Claus Faerber.\n\nThis library is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Net::IDN::Punycode, Net::IDN::UTS46, Net::IDN::IDNA2003,\nNet::IDN::IDNA2008, UTS #46 (<http://www.unicode.org/reports/tr46/>),\nRFC 5890 (<http://tools.ietf.org/html/rfc5890>).\n\nperl v5.34.0                      2022-02-06             Net::IDN::Encode(3pm)",
                "subsections": []
            }
        }
    }
}