rawrrrrrrrr
rawrrrrrrrr

Reputation: 3697

Javascript: converting special characters of the form %XX%XX?

I have a bunch of characters which are encoded in the form %XX%XX. How can I display the actual characters with Javascript?

Examples of the characters are...
what I have / what I want 
%C5%93 / œ
%C3%A6 / æ
%C3%9F / ß

Thanks for the help!

Upvotes: 2

Views: 480

Answers (2)

Oded
Oded

Reputation: 499152

Use the built in decodeURI or decodeURIComponent functions.

Upvotes: 1

kennytm
kennytm

Reputation: 523534

return decodeURIComponent("%C5%93%C3%A6%C3%9F"); // "œæß"

Upvotes: 0

Related Questions