Created
December 5, 2012 03:11
-
-
Save tune/4211836 to your computer and use it in GitHub Desktop.
各文字のUnicode Code Pointを表示する ref: http://qiita.com/items/06d95b8eb2b60d41d680
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
ARGV[0].split(//).each do |ch| | |
puts ch + " [U+#{ch.unpack('U').first.to_s(16)}]" | |
end |
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
$ ruby disp_ucp.rb プログラミング知識を共有しよう。 | |
プ [U+30d7] | |
ロ [U+30ed] | |
グ [U+30b0] | |
ラ [U+30e9] | |
ミ [U+30df] | |
ン [U+30f3] | |
グ [U+30b0] | |
知 [U+77e5] | |
識 [U+8b58] | |
を [U+3092] | |
共 [U+5171] | |
有 [U+6709] | |
し [U+3057] | |
よ [U+3088] | |
う [U+3046] | |
。 [U+3002] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment