Pergunta

I am querying a php script using js with following func call:

$.post("http://localhost/abc/create.php",{
        name:data
    } ,function(data){
        alert(data);
    });

Now this name parameter can be in any language, eg: english, hindi etc.. my code is working fine for english. But it is not working for hindi. When i am sending the request with adding name in the post parameter, the name is sent in a html encoded manner. Is there a way i can send my whole name properly and without any data loss.

Please suggest.. thanks.

Foi útil?

Solução

You said the name parameter gets encoded to html? Can't you just use the html_entity_decode() function in PHP? Should work or any text in any language.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top