The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::IDN::IDNA2003 - Internationalizing Domain Names in Applications (2003) (RFC 3490)

SYNOPSIS

  use Net::IDN::IDNA2003 ':all';
  my $a = idna2003_to_ascii("müller");

DESCRIPTION

This module implements the original IDNA standard defined in RFC 3490 and related documents (IDNA2003). You should use this module if you want an exact implementation of the original IDNA specification.

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.

FUNCTIONS

By default, this module does not export any subroutines. You may use the :all tag to import everything.

You can omit the 'idna2003_' prefix when accessing the functions with a full-qualified module name (e.g. you can access idna2003_to_unicode as Net::IDN::IDNA2003::idna2003_to_unicode or Net::IDN::IDNA2003::to_unicode.

The following functions are available:

idna2003_to_ascii( $label, %param )

This function implements the ToASCII operation from RFC 3490. It converts a single label $label to ASCII and throws an exception on invalid input.

This function takes the following optional parameters:

AllowUnassigned

(boolean) If set to a false value, unassigned code points in the label are not allowed.

The default is false.

UseSTD3ASCIIRules

(boolean) If set to a true value, checks the label for compliance with STD 3 (RFC 1123) syntax for host name parts.

The default is true.

This function does not handle strings that consist of multiple labels (such as domain names).

idna2003_to_unicode( $label, %param )

This function implements the ToUnicode operation from RFC 3490. It converts a single label $label to Unicode. It will never fail but return the string as-is if it cannot be converted.

Converts a single label $label to Unicode. to_unicode never fails.

This function takes the same optional parameters as to_ascii, with the same defaults.

This function does not try to handle strings that consist of multiple labels (such as domain names).

AUTHOR

Claus Färber <CFAERBER@cpan.org>

LICENSE

Copyright 2007-2011 Claus Färber.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Net::IDN::Encode, Net::IDN::Nameprep, Net::IDN::Punycode, RFC 3490 (http://www.ietf.org/rfc/rfc3490.txt)