Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8313821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:37:22+00:00 2026-06-08T20:37:22+00:00

I want a placeholder for a single character string that I haven’t implemented yet.

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:37:23+00:00Added an answer on June 8, 2026 at 8:37 pm

    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:

    # coding: utf-8
    index = {}
    File.readlines('Index.txt').each{|line|
      line =~ /(.*)\t(.*)$/
      index[$1] = $2.to_i(16).chr("UTF-8")
    }
    
    snowman = index['SNOWMAN']
    p snowman #hope it works. My shell does not show the snowman
    p "\u2603" == snowman #true
    

    Edit:

    There is a gem unicode_utils. With this gem you can use:

    require "unicode_utils/grep"
    p UnicodeUtils.grep(/^snowman$/) #=> [#<U+2603 "\u2603" SNOWMAN utf8:e2,98,83>]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a placeholder string, a space character, in an NSTextView that I want
I want to use the placeholder attribute for HTML input[type=text] elements such that the
Can i have placeholder for String java like we have in sql prepared statements?
I want my application to fill in a single field in a form that
There are hundreds of jQuery placeholder/hint plugin. But none that do what I want
i have implemented placeholder just like twitter and google does but i want to
I'm creating a form with a single search field and I want that field
I want to add a control to a placeholder dynamically, like this: int fileCount
I'm using SDWebView image and i want to show an Activity Indicator as placeholder,
I have an input field which has a placeholder text. I want one word

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.