Skip to content

Instantly share code, notes, and snippets.

@tune
Created December 5, 2012 03:11
Show Gist options
  • Save tune/4211836 to your computer and use it in GitHub Desktop.
Save tune/4211836 to your computer and use it in GitHub Desktop.
各文字のUnicode Code Pointを表示する ref: http://qiita.com/items/06d95b8eb2b60d41d680
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
ARGV[0].split(//).each do |ch|
puts ch + " [U+#{ch.unpack('U').first.to_s(16)}]"
end
$ 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