Enconding decoding? what to do

I have this output:
Using <%= string%> or <%=h string%>

Velkommen+til+Personalebasen%2E%0D%0A%0D%0ADu+har+f%E5et+tildelt+et
+brugerID%3A+4531711982…

And this output:
Using <%=u string%>
Velkommen%2Btil%2BPersonalebasen%252E%250D%250A%250D%250ADu%2Bhar%2Bf
%25E5et%2Btild…

Its an output from an sms gateway. So I cannot manipulate the source.

But I want the output to be humanly readable. The output is danish for
those wondering.

No native decoding option ? Or do I need to do some RegExp magic?
( hope not, i’m afraid of RegExp ^^ )

Thx in advance

David

On 11 Sep 2008, at 14:02, David L. wrote:

%25E5et%2Btild…

Its an output from an sms gateway. So I cannot manipulate the source.

But I want the output to be humanly readable. The output is danish for
those wondering.

CGI.unescape

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs