Net::IDN::Encode(3pm) User Contributed Perl Documentation Net::IDN::Encode(3pm)
NAME
Net::IDN::Encode - Internationalizing Domain Names in Applications (RFC 3490)
SYNOPSIS
use Net::IDN::Encode;
$ascii = domain_to_ascii('mueller.example.org');
$ascii = domain_to_ascii('X.example.net');
DESCRIPTION
This module provides an easy-to-use interface for encoding and decoding Internationalized
Domain Names (IDNs).
IDNs use characters drawn from a large repertoire (Unicode), but IDNA allows the non-ASCII
characters to be represented using only the ASCII characters already allowed in so-called
host names today (letter-digit-hypen, "/[A-Z0-9-]/i").
FUNCTIONS
The following functions are exported by default.
domain_to_ascii( $domain )
Converts all labels of the hostname $domain (with labels seperated by dots) to ASCII.
Will throw an exception on invalid input.
The following characters are recognized as dots: U+002E (full stop), U+3002
(ideographic full stop), U+FF0E (fullwidth full stop), U+FF61 (halfwidth ideographic
full stop).
domain_to_unicode( $domain )
Converts all labels of the hostname $domain (with labels seperated by dots) to
Unicode. Will throw an exception on invalid input.
The following characters are recognized as dots: U+002E (full stop), U+3002
(ideographic full stop), U+FF0E (fullwidth full stop), U+FF61 (halfwidth ideographic
full stop).
email_to_ascii( $email )
Converts the domain part (right hand side, separated by an at sign) of the
RFC 2821/2822 email address to ASCII. May throw an exception on invalid input.
This function currently does not handle internationalization of the local-part (left
hand side).
The follwing characters are recognized as at signs: U+0040 (commercial at), U+FF20
(fullwidth commercial at).
email_to_unicode( $email )
Converts the domain part (right hand side, separated by an at sign) of the
RFC 2821/2822 email address to Unicode. May throw an exception on invalid input.
This function currently does not handle internationalization of the local-part (left
hand side).
The follwing characters are recognized as at signs: U+0040 (commercial at), U+FF20
(fullwidth commercial at).
AUTHOR/LICENSE
Copyright X 2007-2008 Claus Faerber <CFAERBER AT cpan.org>
This library is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
SEE ALSO
Net::IDN::Nameprep, Net::IDN::Punycode, RFC 3490 <http://www.ietf.org/rfc/rfc3490.txt>
perl v5.10.0 2008-09-19 Net::IDN::Encode(3pm)
Generated by $Id: phpMan.php,v 4.49 2006/02/26 13:18:18 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2012-05-24 20:47 @38.107.179.239 Crawled by CCBot/1.0 (+http://www.commoncrawl.org/bot.html)