开发者

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

开发者 https://www.devze.com 2022-12-26 06:21 出处:网络
I have a bunch of characters which are encoded in the form %XX%XX. How can I display the actual characters with Javascript?

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...
wha开发者_StackOverflowt I have / what I want 
%C5%93 / œ
%C3%A6 / æ
%C3%9F / ß

Thanks for the help!


Use the built in decodeURI or decodeURIComponent functions.


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

精彩评论

暂无评论...
验证码 换一张
取 消