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">

1 Answer 1

1

You can use JavaScript's decodeURI function

decodeURI("https://www.google.com/?q=%D0%B0%D0%B1%D0%B2")
//returns https://www.google.com/?q=абв
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy 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.