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开发者_开发百科.
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>
精彩评论