URI-1.54 > URI::_punycode

名前

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.

URI::_punycode は、Unicode を、IDNA で使うための Unicode の効率的な エンコーディングである Punycode との間でエンコード/デコードするための モジュールです。

This module requires Perl 5.6.0 or over to handle UTF8 flagged Unicode strings.

このモジュールは、UTF8 フラグを持った Unicode 文字列を扱うために、 Perl 5.6.0 以上が必要です。

関数

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.

Unicode 文字列 (UTF8 フラグを持った変数) を取り、 Punycode エンコードされたものを返します。

decode_punycode
  $unicode = decode_punycode($punycode)

takes Punycode encoding and returns original Unicode string.

Punycode エンコードされたものを取り、 元の Unicode 文字列を返します。

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.

SEE ALSO

IDNA::Punycode, RFC 3492