Reputation: 207
The string is:
"Hugo S%C3%A1nchez"
When I try to decode it it shows as:
irb(main):016:0> CGI.escapeHTML('Hugo S%C3%A1nchez')
=> "Hugo S%C3%A1nchez"
How should I make it work so it looks like Hugo Sánchez
?
Upvotes: 0
Views: 94
Reputation: 369284
Use CGI.unescape:
CGI.unescape "Hugo S%C3%A1nchez" # => "Hugo S\u00E1nchez"
Upvotes: 1