I would think it would be:
"✓".encode(:unicode)
But I think this is the wrong use of .encode. And when I say:
"✓".encode('Unicode')
he cannot perform the conversion.
If you are using Ruby 1.9 (which has much better native coding support), you can do this:
> checkmark = "\u2713" # => "✓" > checkmark.encoding # => #<Encoding:UTF-8>
Source: https://habr.com/ru/post/887853/More articles:jQuery Mobile "return false" when submitting a form - jqueryHow to integrate JMenuBar in MVC architecture in Java? - javaHow to convert a boolean value from true / false to yes / no in Telerik ASP.NET MVC Grid - asp.netJava local processes are gray when trying to connect via JMX - javahaskell - hyperoperation (ackermann), tetition - haskellAJAX vs PHP right in JS - javascriptAre there any good javascript currencies or decimal classes? - javascriptOpen which button button starts sending - javascriptBring JPanel in front of other objects in java (SWING) - javaAndroid: How to split a LinearLayout in two parts of exactly the same size? - androidAll Articles