0

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.

poke
  • 369,085
  • 72
  • 557
  • 602
mudit
  • 25,306
  • 32
  • 90
  • 132

1 Answers1

1

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.