1Net::IDN::UTS46(3)    User Contributed Perl Documentation   Net::IDN::UTS46(3)
2
3
4

NAME

6       Net::IDN::UTS46 - Unicode IDNA Compatibility Processing (UTS #46)
7

SYNOPSIS

9         use Net::IDN:: ':all';
10         my $a = uts46_to_ascii("mueller.example.org");
11         my $b = Net::IDN::UTS46::to_unicode('EXAMPLE.XN--11B5BS3A9AJ6G');
12
13         $domain =~ m/\P{Net::IDN::UTS46::IsDisallowed} and die 'oops';
14

DESCRIPTION

16       This module implements the Unicode Technical Standard #46 (Unicode IDNA
17       Compatibility Processing). UTS #46 is one variant of Internationalized
18       Domain Names (IDN), which aims to be compatible with domain names
19       registered under either IDNA2003 or IDNA2008.
20
21       You should use this module if you want an exact implementation of the
22       UTS #46 specification.
23
24       However, if you just want to convert domain names and don't care which
25       standard is used internally, you should use Net::IDN::Encode instead.
26

FUNCTIONS

28       By default, this module does not export any subroutines. You may use
29       the ":all" tag to import everything.
30
31       You can omit the 'uts46_' prefix when accessing the functions with a
32       full-qualified module name (e.g. you can access "uts46_to_unicode" as
33       "Net::IDN::UTS46::uts46_to_unicode" or "Net::IDN::UTS46::to_unicode".
34
35       The following functions are available:
36
37       uts46_to_ascii( $domain, %param )
38           Implements the "ToASCII" function from UTS #46, section 4.2. It
39           converts a domain name to ASCII and throws an exception on invalid
40           input.
41
42           This function takes the following optional parameters (%param):
43
44           AllowUnassigned
45               (boolean) If set to a true value, unassigned code points in the
46               label are allowed. This is an extension over UTS #46.
47
48               The default is false.
49
50           UseSTD3ASCIIRules
51               (boolean) If set to a true value, checks the label for
52               compliance with STD 3 (RFC 1123) syntax for host name parts.
53
54               The default is true.
55
56           TransitionalProcessing
57               (boolean) If set to true, the conversion will be compatible
58               with IDNA2003. This only affects four characters: 'ss'
59               (U+00DF), 'X' (U+03C2), ZWJ (U+200D) and ZWNJ (U+200C).
60               Usually, you will want to set this to false.
61
62               The default is false.
63
64       uts46_to_unicode( $label, %param )
65           Implements the "ToUnicode" function from UTS #46, section 4.3. It
66           converts a domain name to Unicode and throws an exception on
67           invalid input.
68
69           This function takes the following optional parameters (%param):
70
71           AllowUnassigned
72                 see above.
73
74           UseSTD3ASCIIRules
75                 see above.
76
77           TransitionalProcessing
78               (boolean) If given, this parameter must be false. The UTS #46
79               specification does not define transitional processing for
80               ToUnicode.
81

UNICODE CHARACTER PROPERTIES

83       This module also defines the character properties listed below.
84
85       Each character has exactly one of the following properties:
86
87       "\p{Net::IDN::UTS46::IsValid}"
88           The code point is valid, and not modified (i.e. a deviation
89           character) in UTS #46.
90
91       "\p{Net::IDN::UTS46::IsIgnored}"
92           The code point is removed (i.e. mapped to an empty string) in
93           UTS #46.
94
95       "\p{Net::IDN::UTS46::IsMapped}"
96           The code point is replaced by another string in UTS #46.
97
98       "\p{Net::IDN::UTS46::IsDeviation}"
99           The code point is either mapped or valid, depending on whether the
100           processing is transitional or not.
101
102       "\p{Net::IDN::UTS46::IsDisallowed}"
103           The code point is not allowed in UTS #46.
104
105       "\p{Net::IDN::UTS46::IsDisallowedSTD3Ignored}"
106           The code point is not allowed in UTS #46 if "UseSTDASCIIRules" are
107           used but would be ignored otherwise.
108
109       "\p{Net::IDN::UTS46::IsDisallowedSTD3Mapped}"
110           The code point is not allowed in UTS #46 if "UseSTDASCIIRules" are
111           used but would be mapped otherwise.
112

AUTHOR

114       Claus Faerber <CFAERBER@cpan.org>
115

LICENSE

117       Copyright 2011-2018 Claus Faerber.
118
119       This library is free software; you can redistribute it and/or modify it
120       under the same terms as Perl itself.
121

SEE ALSO

123       Net::IDN::UTS46::Mapping, Net::IDN::Encode, UTS #46
124       (<http://www.unicode.org/reports/tr46/>)
125
126
127
128perl v5.32.1                      2021-01-27                Net::IDN::UTS46(3)
Impressum