Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi guys, I have a problem, and who can help me.

HTML
js code:
var url=decodeURI("%D0%C2%CE%C5%D0%C5") 
//error:decodeURI The URI to be decoded is not a valid encoding
Posted
Comments
Sergey Alexandrovich Kryukov 17-Aug-12 16:44pm    
What do you expect on input, output, why, and what you get in fact?
--SA

1 solution

This throws "malformed URI sequence" exception. I don't know what string do you mean, but it wasn't probably created by encodeURI. To know what is well-formed sequence, please see:
http://en.wikipedia.org/wiki/Percent-encoding[^].

Alternatively, type the exact string you need and pass it as a parameter to encodeURI, to see what should you have on input of decodeURI. Please see:
http://www.w3schools.com/jsref/jsref_encodeuri.asp[^],
http://www.w3schools.com/jsref/jsref_decodeuri.asp[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900