.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Net::IDN::UTS46 3pm" .TH Net::IDN::UTS46 3pm "2014-09-17" "perl v5.20.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::IDN::UTS46 \- Unicode IDNA Compatibility Processing (UTS\ #46) .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Net::IDN:: \*(Aq:all\*(Aq; \& my $a = uts46_to_ascii("mu\*:ller.example.org"); \& my $b = Net::IDN::UTS46::to_unicode(\*(AqEXAMPLE.XN\-\-11B5BS3A9AJ6G\*(Aq); \& \& $domain =~ m/\eP{Net::IDN::UTS46::IsDisallowed} and die \*(Aqoops\*(Aq; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module implements the Unicode Technical Standard #46 (Unicode \s-1IDNA\s0 Compatibility Processing). \s-1UTS\s0\ #46 is one variant of Internationalized Domain Names (\s-1IDN\s0), which aims to be compatible with domain names registered under either \s-1IDNA2003\s0 or \s-1IDNA2008.\s0 .PP You should use this module if you want an exact implementation of the \s-1UTS\s0\ #46 specification. .PP However, if you just want to convert domain names and don't care which standard is used internally, you should use Net::IDN::Encode instead. .SH "FUNCTIONS" .IX Header "FUNCTIONS" By default, this module does not export any subroutines. You may use the \&\f(CW\*(C`:all\*(C'\fR tag to import everything. .PP You can omit the \f(CW\*(Aquts46_\*(Aq\fR prefix when accessing the functions with a full-qualified module name (e.g. you can access \f(CW\*(C`uts46_to_unicode\*(C'\fR as \&\f(CW\*(C`Net::IDN::UTS46::uts46_to_unicode\*(C'\fR or \f(CW\*(C`Net::IDN::UTS46::to_unicode\*(C'\fR. .PP The following functions are available: .ie n .IP "uts46_to_ascii( $domain, %param )" 4 .el .IP "uts46_to_ascii( \f(CW$domain\fR, \f(CW%param\fR )" 4 .IX Item "uts46_to_ascii( $domain, %param )" Implements the \*(L"ToASCII\*(R" function from \s-1UTS\s0\ #46, section\ 4.2. It converts a domain name to \&\s-1ASCII\s0 and throws an exception on invalid input. .Sp This function takes the following optional parameters (\f(CW%param\fR): .RS 4 .IP "AllowUnassigned" 4 .IX Item "AllowUnassigned" (boolean) If set to a true value, unassigned code points in the label are allowed. This is an extension over \s-1UTS\s0\ #46. .Sp The default is false. .IP "UseSTD3ASCIIRules" 4 .IX Item "UseSTD3ASCIIRules" (boolean) If set to a true value, checks the label for compliance with \s-1STD\s0\ 3 (\s-1RFC\s0\ 1123) syntax for host name parts. .Sp The default is true. .IP "TransitionalProcessing" 4 .IX Item "TransitionalProcessing" (boolean) If set to true, the conversion will be compatible with \s-1IDNA2003.\s0 This only affects four characters: \f(CW\*(Aq\*8\*(Aq\fR (U+00DF), 'X' (U+03C2), \s-1ZWJ \s0(U+200D) and \&\s-1ZWNJ \s0(U+200C). Usually, you will want to set this to false. .Sp The default is false. .RE .RS 4 .RE .ie n .IP "uts46_to_unicode( $label, %param )" 4 .el .IP "uts46_to_unicode( \f(CW$label\fR, \f(CW%param\fR )" 4 .IX Item "uts46_to_unicode( $label, %param )" Implements the \*(L"ToUnicode\*(R" function from \s-1UTS\s0\ #46, section\ 4.3. It converts a domain name to Unicode and throws an exception on invalid input. .Sp This function takes the following optional parameters (\f(CW%param\fR): .RS 4 .IP "AllowUnassigned" 4 .IX Item "AllowUnassigned" .Vb 1 \& see above. .Ve .IP "UseSTD3ASCIIRules" 4 .IX Item "UseSTD3ASCIIRules" .Vb 1 \& see above. .Ve .IP "TransitionalProcessing" 4 .IX Item "TransitionalProcessing" (boolean) If given, this parameter must be false. The \s-1UTS\s0\ #46 specification does not define transitional processing for ToUnicode. .RE .RS 4 .RE .SH "UNICODE CHARACTER PROPERTIES" .IX Header "UNICODE CHARACTER PROPERTIES" This module also defines the character properties listed below. .PP Each character has exactly one of the following properties: .ie n .IP """\ep{Net::IDN::UTS46::IsValid}""" 4 .el .IP "\f(CW\ep{Net::IDN::UTS46::IsValid}\fR" 4 .IX Item "p{Net::IDN::UTS46::IsValid}" The code point is valid, and not modified (i.e. a deviation character) in \s-1UTS\s0\ #46. .ie n .IP """\ep{Net::IDN::UTS46::IsIgnored}""" 4 .el .IP "\f(CW\ep{Net::IDN::UTS46::IsIgnored}\fR" 4 .IX Item "p{Net::IDN::UTS46::IsIgnored}" The code point is removed (i.e. mapped to an empty string) in \s-1UTS\s0\ #46. .ie n .IP """\ep{Net::IDN::UTS46::IsMapped}""" 4 .el .IP "\f(CW\ep{Net::IDN::UTS46::IsMapped}\fR" 4 .IX Item "p{Net::IDN::UTS46::IsMapped}" The code point is replaced by another string in \s-1UTS\s0\ #46. .ie n .IP """\ep{Net::IDN::UTS46::IsDeviation}""" 4 .el .IP "\f(CW\ep{Net::IDN::UTS46::IsDeviation}\fR" 4 .IX Item "p{Net::IDN::UTS46::IsDeviation}" The code point is either mapped or valid, depending on whether the processing is transitional or not. .ie n .IP """\ep{Net::IDN::UTS46::IsDisallowed}""" 4 .el .IP "\f(CW\ep{Net::IDN::UTS46::IsDisallowed}\fR" 4 .IX Item "p{Net::IDN::UTS46::IsDisallowed}" The code point is not allowed in \s-1UTS\s0\ #46. .ie n .IP """\ep{Net::IDN::UTS46::IsDisallowedSTD3Ignored}""" 4 .el .IP "\f(CW\ep{Net::IDN::UTS46::IsDisallowedSTD3Ignored}\fR" 4 .IX Item "p{Net::IDN::UTS46::IsDisallowedSTD3Ignored}" The code point is not allowed in \s-1UTS\s0\ #46 if \f(CW\*(C`UseSTDASCIIRules\*(C'\fR are used but would be ignored otherwise. .ie n .IP """\ep{Net::IDN::UTS46::IsDisallowedSTD3Mapped}""" 4 .el .IP "\f(CW\ep{Net::IDN::UTS46::IsDisallowedSTD3Mapped}\fR" 4 .IX Item "p{Net::IDN::UTS46::IsDisallowedSTD3Mapped}" The code point is not allowed in \s-1UTS\s0\ #46 if \f(CW\*(C`UseSTDASCIIRules\*(C'\fR are used but would be mapped otherwise. .SH "AUTHOR" .IX Header "AUTHOR" Claus Fa\*:rber .SH "LICENSE" .IX Header "LICENSE" Copyright 2011\-2013 Claus Fa\*:rber. .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" Net::IDN::UTS46::Mapping, Net::IDN::Encode, \s-1UTS\s0\ #46 ()