JQuery AJAX is not sending UTF-8 to my server, only in IE

前端 未结 4 754
情话喂你
情话喂你 2020-12-05 10:42

I am sending UTF-8, japanese text, to my server. It works in Firefox. My access.log and headers are:

/ajax/?q=%E6%BC%A2%E5%AD%97
Accept-Charset  ISO-8859-1,         


        
4条回答
  •  暖寄归人
    2020-12-05 10:47

    I'we read this post hoping it would solve the problem I had came across and that had to do with utf8 conversions.

    In my case it turned out that the server engine (node.js) calculating the Content-length of the data with the data considered to be raw and not utf8, thus two character extended chars in uft8 was calculated as if they where one char resulting in the server sending one character too little.

    See what I did to solve it here: Not well formed Json when sending to CouchDB

提交回复
热议问题