-1

How can I extract the ascii code from a string and then convert it to char?

string = "a – b"

to

a – b

tokhi
  • 21,044
  • 23
  • 95
  • 105

1 Answers1

0

Use CGI library from ruby

CGI.unescapeHTML("a – b")
#=> "a – b"
Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88