![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello Everyone, I just joined your Group and hope to find a guru that can answer this question. Preface: I needed to serialize a form and POST it with jQuery AJAX. I setup the content type for "ISO-8859-1" because that was a requirement in this case. I set the option in jQuery and on the server. Well, no matter what I did jQuery always serialized in "UTF-8". After a lot of pain and suffering I found the solution to use UTF_Decode on the server side. There is JavaScript function and PHP function. The JavaScript can "runat server" to support ASP and .NET as well. Question: We have customers that will need to use Chinese Char sets. This decode solution will not always be viable. Why does jQuery ignore the Content Type I set on the client side? It seems like this problem would not exist if jQuery simply encoded everything the way the programmer asks. Is there a way to get jQuery to POST in the encoding I want, such as simplified Chinese (e.g. gb18030). I understand someone will likely tell me that I should use UTF-8 for absolutely everything. But I would still like to know why jQuery's content type option doesn't work. If that would work it would save a lot of people a lot of trouble. |
![]() |
| Thread Tools | |
| Display Modes | |
| |