Follow

$ echo ㄘ | bundle exec ruby show-unicode-name.rb
"ㄘ" BOPOMOFO LETTER C
$ cat show-unicode-name.rb
#!/usr/bin/ruby
#
# usage: ruby show-unicoce-name.rb Ʊ”−ʓ
#
require "unicode/name"

str = ARGV.first
unless str
str = $stdin.read.chomp
end

str.chars.each do |c|
puts "#{c.inspect}\t#{Unicode::Name.of c}"
end

· · Web · 1 · 1 · 2

$ bundle exec ruby show-unicode-name.rb Ʊ”−ʓ
"Ʊ" LATIN CAPITAL LETTER UPSILON
"”" RIGHT DOUBLE QUOTATION MARK
"−" MINUS SIGN
"ʓ" LATIN SMALL LETTER EZH WITH CURL

こういう風にもつかえるようにしてあった

Sign in to participate in the conversation
zundon

Zundon is a single user instance as home of @zundan as well as a test bed for changes of the code.