0

I have html5 + js app which reads url params and make some requests.The initial requests looks like this:

https://www.google.com/?q=%D0%B0%D0%B1%D0%B2

But then when I'm reading url param with Javascript and creating another request it is executed like this:

GET /1.x/?format=json&someParam=?????? HTTP/1.1

How can I force Javascript to read properly Url params (to use proper encoding). One more important notice, this works absolutely fine in Chrome but in IE fails. Thank you for any suggestions

ps: html has head tag to specify encoding

<meta charset="UTF-8">
askedJun 12, 2015 at 21:56
Mando's user avatar

1 Answer1

1

You can use JavaScript'sdecodeURI function

decodeURI("https://www.google.com/?q=%D0%B0%D0%B1%D0%B2")//returns https://www.google.com/?q=абв
answeredJun 12, 2015 at 22:05
tcigrand's user avatar
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.