Net::IDN::UTS46 - Unicode IDNA Compatibility Processing |
Net::IDN::UTS46 - Unicode IDNA Compatibility Processing (UTS #46)
use Net::IDN:: ':all'; my $a = uts46_to_ascii("müller.example.org"); my $b = Net::IDN::UTS46::to_unicode('EXAMPLE.XN--11B5BS3A9AJ6G'); $domain =~ m/\P{Net::IDN::UTS46::IsDisallowed} and die 'oops';
This module implements the Unicode Technical Standard #46 (Unicode IDNA Compatibility Processing). UTS #46 is one variant of Internationalized Domain Names (IDN), which aims to be compatible with domain names registered under either IDNA2003 or IDNA2008.
You should use this module if you want an exact implementation of the UTS #46 specification.
However, if you just want to convert domain names and don't care which standard is used internally, you should use the Net::IDN::Encode manpage instead.
By default, this module does not export any subroutines. You may use the
:all
tag to import everything.
You can omit the 'uts46_'
prefix when accessing the functions with a
full-qualified module name (e.g. you can access uts46_to_unicode
as
Net::IDN::UTS46::uts46_to_unicode
or Net::IDN::UTS46::to_unicode
.
The following functions are available:
This function takes the following optional parameters (%param
):
The default is false.
The default is true.
'ß'
(U+00DF), 'ς' (U+03C2), ZWJ (U+200D) and
ZWNJ (U+200C). Usually, you will want to set this to false.
The default is false.
This function takes the following optional parameters (%param
):
see above.
see above.
This module also defines the character properties listed below.
Each character has exactly one of the following properties:
\p{Net::IDN::UTS46::IsValid}
\p{Net::IDN::UTS46::IsIgnored}
\p{Net::IDN::UTS46::IsMapped}
\p{Net::IDN::UTS46::IsDeviation}
\p{Net::IDN::UTS46::IsDisallowed}
\p{Net::IDN::UTS46::IsDisallowedSTD3Ignored}
UseSTDASCIIRules
are used but would be ignored otherwise.
\p{Net::IDN::UTS46::IsDisallowedSTD3Mapped}
UseSTDASCIIRules
are used but would be mapped otherwise.
Claus Färber <CFAERBER@cpan.org>
Copyright 2011-2014 Claus Färber.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
the Net::IDN::UTS46::Mapping manpage, the Net::IDN::Encode manpage, UTS #46 (http://www.unicode.org/reports/tr46/)
Net::IDN::UTS46 - Unicode IDNA Compatibility Processing |