Last active
August 29, 2015 13:58
-
-
Save hakanai/10005359 to your computer and use it in GitHub Desktop.
This file contains 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
irb(main):010:0> Fiddlybits::Encoding::JISX0208_1983_0.decode('$"$$$&$($*$"$$$&$($*$"$$$&$($*$"$$$&$($*').each do |frag| | |
irb(main):011:1* str = [frag.code_point].pack("U") | |
irb(main):012:1> puts "#{frag.bytes} => #{frag.code_point} : #{str}" | |
irb(main):013:1> end | |
[36, 34] => 12354 : あ | |
[36, 36] => 12356 : い | |
[36, 38] => 12358 : う | |
[36, 40] => 12360 : え | |
[36, 42] => 12362 : お | |
[36, 34] => 12354 : あ | |
[36, 36] => 12356 : い | |
[36, 38] => 12358 : う | |
[36, 40] => 12360 : え | |
[36, 42] => 12362 : お | |
[36, 34] => 12354 : あ | |
[36, 36] => 12356 : い | |
[36, 38] => 12358 : う | |
[36, 40] => 12360 : え | |
[36, 42] => 12362 : お | |
[36, 34] => 12354 : あ | |
[36, 36] => 12356 : い | |
[36, 38] => 12358 : う | |
[36, 40] => 12360 : え | |
[36, 42] => 12362 : お | |
=> [ | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d17558 @bytes=[36, 34], @code_point=12354, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d173c8 @bytes=[36, 36], @code_point=12356, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d17260 @bytes=[36, 38], @code_point=12358, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d170f8 @bytes=[36, 40], @code_point=12360, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16f90 @bytes=[36, 42], @code_point=12362, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16e28 @bytes=[36, 34], @code_point=12354, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16cc0 @bytes=[36, 36], @code_point=12356, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16b58 @bytes=[36, 38], @code_point=12358, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d169f0 @bytes=[36, 40], @code_point=12360, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16888 @bytes=[36, 42], @code_point=12362, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16720 @bytes=[36, 34], @code_point=12354, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d165b8 @bytes=[36, 36], @code_point=12356, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16450 @bytes=[36, 38], @code_point=12358, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d162e8 @bytes=[36, 40], @code_point=12360, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16180 @bytes=[36, 42], @code_point=12362, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d16018 @bytes=[36, 34], @code_point=12354, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d15eb0 @bytes=[36, 36], @code_point=12356, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d15d48 @bytes=[36, 38], @code_point=12358, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d15be0 @bytes=[36, 40], @code_point=12360, @explanation="table lookup">, | |
#<Fiddlybits::Encoding::DecodedData:0x007ffaa4d15a78 @bytes=[36, 42], @code_point=12362, @explanation="table lookup"> | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment