I need to change my character encoding to EUC-JP
Here is my code:
formData.append("send", "送信");
var xhr = new XMLHttpRequest();
xhr.open("POST", "foo.php", false);
xhr.setRequestHeader("Content-type", "text/html; charset=euc-jp");
xhr.send(formData);
I've just learned that:
Content-Type
cannot be set upon sending FormData() object.
and
the default encoding is
UTF-8
Because of UTF-8
encoding, I cannot receive the correct japanese characters on foo.php.