Created
August 20, 2012 07:59
-
-
Save aileron/3402037 to your computer and use it in GitHub Desktop.
Ruby1.9 で Shift_JIS 風 UTF-8 と CP932 風 UTF-8 の正規化
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
# ruby1.9 で正規化して、エンコードするまで | |
"なんかきもいやつら". | |
tr("\u{301C 2016 2212 00A2 00A3 00AC 2014 00A6}","\u{FF5E 2225 FF0D FFE0 FFE1 FFE2 2015 FFE4}").encode("sjis") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment