0

Back in the good old days, the ajax charset was always the same as the charset of the page. Now it looks like the charset is ALWAYS utf8 and it's impossible to change it.

Whereas, the standard form.submit() uses the same Accept-Charset as the page.

Is it true that you cannot change the Accept-Charset of an ajax post any longer? If's is possible, how can it be done in Chrome--via javascript and not command line args.

Brian McGinity
  • 5,777
  • 5
  • 36
  • 46
  • http://stackoverflow.com/questions/11906904/how-to-force-xmlhttprequest-to-use-iso-8859-1-charset-only – adeneo Dec 25 '14 at 22:18
  • I've tired this, I do not think it works in chrome. At least I cannot make it work. I've been testing using 'POST', this example is using 'GET'-- I will try it as a GET. – Brian McGinity Dec 25 '14 at 22:32
  • I must be using some messed up ajax code some where, the code in the post you gave does work. – Brian McGinity Dec 25 '14 at 22:49
  • @adeneo I take that back. As soon as the post body added: `xhr.send(postBody)`, the content type is forced to UTF8 – Brian McGinity Dec 26 '14 at 00:19

0 Answers0