2010-05-12 23:30:57 +02:00
|
|
|
Net::LibIDN - Perl bindings for GNU Libidn
|
|
|
|
|
2016-11-06 22:57:59 +01:00
|
|
|
Provides bindings for GNU Libidn, a C library for handling
|
|
|
|
Internationalized Domain Names according to IDNA (RFC 3490), in a way
|
|
|
|
very much inspired by Turbo Fredriksson's PHP-IDN. There is currently
|
|
|
|
no support for Perl's unicode capabilities (man perlunicode). All input
|
|
|
|
strings are assumed to be octet strings, all output strings are generated
|
|
|
|
as octet strings. Thus, if you require Perl's unicode features, you will
|
|
|
|
have to convert your strings manually. For example:
|
2010-05-12 23:30:57 +02:00
|
|
|
|
|
|
|
use Encode;
|
|
|
|
use Data::Dumper;
|
|
|
|
print Dumper(Net::LibIDN::idn_to_unicode('xn--uro-j50a.com', 'utf-8'));
|
2016-11-06 22:57:59 +01:00
|
|
|
print Dumper(decode(
|
|
|
|
'utf-8', Net::LibIDN::idn_to_unicode('xn--uro-j50a.com', 'utf-8')));
|