I have a GET form that is processed using Javascript. It sends data to a specific file (for example, 'act.html'). In this form, only one text box in which I write the name in Russian. Why when the file 'act.html' gets a form, then, for example, instead of the word 'name' it writes '% C8% EC% FF'? Is it possible to get rid of it?

  • send the form using the POST method :) - arg
  • hashcode.ru/questions/399211/... Alas, I can not. - nick
  • Is it possible to send the form to an html file? Charset point? - Steve
  • I do not remember. So long ago it was. I was a newbie then. And now I don’t do that kind of stuff)) - nick

2 answers 2

It turns out by putting down a coded URL, and to read, you can use the built-in decodeURI deco function (var)

You can test it here: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_decodeuricomponent

  • why zaminusili? check the solution !!! - Vladimir Ch

Perhaps it will remain in the address bar, but if you receive it $_GET['...'] , you will most likely have a normal Russian language, or try to change the encoding, which is unlikely to help.

  • In my form, all data is sent via Javascript: document.getElementById ("form"). Submit (); . And taken in the file 'act.html' in the same way: get ["txt"]; . I say this to the fact that the PHP language on my site is not supported. And Javascript unfortunately does not understand Russian letters. - nick
  • The encoding will be different if from one to another layout to send words in one encoding !!! and if it is encoded, then it will open in any encoding! - Vladimir Ch