Tatsuhiko Miyagawa > IDNA-Punycode-0.02 > IDNA::Punycode

Download:
IDNA-Punycode-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.02   Source   Latest Release: IDNA-Punycode-0.03

NAME ^

IDNA::Punycode - encodes Unicode string in Punycode

SYNOPSIS ^

  use IDNA::Punycode;
  $punycode = encode_punycode($unicode);
  $unicode  = decode_punycode($punycode);

DESCRIPTION ^

IDNA::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.

FUNCTIONS ^

This module exports following functions by default.

encode_punycode
  $punycode = encode_punycode($unicode);

takes Unicode string (UTF8-flagged variable) and returns Punycode encoding for it.

decode_punycode
  $unicode = decode_punycode($punycode)

takes Punycode encoding and returns original Unicode string.

These functions throws exceptionsn on failure. You can catch 'em via eval.

AUTHOR ^

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

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

SEE ALSO ^

http://www.ietf.org/internet-drafts/draft-ietf-idn-punycode-01.txt

Encode::Punycode

syntax highlighting: