I want a placeholder for a single character string that I haven’t implemented yet. How do I print a snowman in Ruby 1.9?
Currently, I can do
# coding: utf-8
puts "☃"
or
puts "\u2603"
but is it possible to use the “Index entries” field (mentioned here) snowy weather or SNOWMAN or weather, snowy to get the character to print?
I am not using Rails.
You may download the Name Index from unicode.org and parse the characters names into a Hash (or better a DB or similiar).
Then you can get it with normal data access functions.
Example:
Edit:
There is a gem unicode_utils. With this gem you can use: