Firefoxだと家族くっつくなあ
$ bundle exec ruby show-unicode-name.rb
"" MAN
"" ZERO WIDTH JOINER
"" WOMAN
"" ZERO WIDTH JOINER
"" BOY
"" ZERO WIDTH JOINER
"" BOY
$ 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
Grapheme clusterとしてはくっついている
$ ruby -e 'x="";p x.grapheme_clusters, x.chars'
[""]
["", "", "
", "", "
", "", "
"]