Ajax Error – Question marks on sending Foreign Language

Asked By 20 points N/A Posted on -
qa-featured

Hi!

Couple of days ago, I was required to send some Chinese characters via Ajax wire though I have faced with question marks instead of the typed Chinese characters. Following is the screen-shot of what I have faced. Can someone help me with this? Thanks in advance!

SHARE
Answered By 0 points N/A #136560

Ajax Error – Question marks on sending Foreign Language

qa-featured

Hello Davide D.Eckr, 

I like your interesting question. There is just a little more step that you have to take to fix it. Just write "encodeURIComponent" before document.getElementById(''textname").value and enclose the document.getElementById(''textname").value in brackets. The task of encodeURIComponent is to encode everything that has got special meaning.

You might also try "encodeURI". The task of it is done based on the assumption that the input is fully a URI that might have characters which need to be encoded.

Any odd the above methods is applicable for this case and will surely solve the matter.

Hope your problem gets solved soon.

Good Luck!

Related Questions