Edited at

各文字のUnicode Code Pointを表示する

More than 5 years have passed since last update.


disp_ucp.rb

#!/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]