Created
June 29, 2011 05:33
-
-
Save onishi/1053219 to your computer and use it in GitHub Desktop.
decode_punycode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use IDNA::Punycode; | |
use Encode; | |
idn_prefix('xn--'); | |
decode_punycode('xn--cho'); #=> '䑵' | |
decode_punycode('xn--motemen'); #=> '嵡嵣嵫嵧嵨' | |
decode_punycode('xn--hitode'); #=> '岴岊岲' | |
decode_punycode('xn--hakobe932'); #=> IDNA::Punycode が落ちて abort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment