Mo. Mo. - 1 month ago 18
Ruby Question

Ruby equivalent to JavaScript’s encodeURIComponent that produces identical output?

Hi is there an equivalent ruby method to JavaScript

encodeURIComponent
method? i am using the
URI.unescape(str)
but it recognizes the
"£"
(after
encodeURIComponent
it becomes
"%C2%A3"
) as a
"?"
sign. any solution's? thanks

Answer