Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a checkmark in unicode?

I would think it would be:

"✓".encode(:unicode)

But I think this is not the correct usage of .encode. And when I say:

"✓".encode('Unicode')

it cannot do the conversion.

like image 330
Jeremy Smith Avatar asked May 11 '11 16:05

Jeremy Smith


People also ask

How do I type a check mark in Unicode?

U+2713 ✓ CHECK MARK.

How do you type a checkmark on a keyboard?

Position the cursor where you want to insert the check mark symbol. Press Alt + 0252 or Alt + 0254 on the numeric keypad. If the sequence doesn't work, press NumLock on the numeric keypad.

What is the character code for checkmark?

is available two squares away from it (character code 254). Select the check mark you want. Click Insert.


1 Answers

If you're using Ruby 1.9 (which has much better built-in encoding support), you can do this:

> checkmark = "\u2713"
# => "✓" 
> checkmark.encoding
# => #<Encoding:UTF-8> 
like image 56
Dylan Markow Avatar answered Sep 28 '22 09:09

Dylan Markow