URI::_punycode - encodes Unicode string in Punycode
use URI::_punycode; $punycode = encode_punycode($unicode); $unicode = decode_punycode($punycode);
URI::_punycode is a module to encode / decode Unicode strings into Punycode, an efficient encoding of Unicode for use with IDNA.
This module requires Perl 5.6.0 or over to handle UTF8 flagged Unicode strings.
This module exports following functions by default.
$punycode = encode_punycode($unicode);
takes Unicode string (UTF8-flagged variable) and returns Punycode encoding for it.
$unicode = decode_punycode($punycode)
takes Punycode encoding and returns original Unicode string.
These functions throw exceptions on failure. You can catch 'em via eval.
eval
Tatsuhiko Miyagawa <miyagawa@bulknews.net> is the author of IDNA::Punycode v0.02 which was the basis for this module.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
IDNA::Punycode, RFC 3492
To install URI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URI
CPAN shell
perl -MCPAN -e shell install URI
For more information on module installation, please visit the detailed CPAN module installation guide.