that came up a while ago.... I added a patch to jQuery ajax.js that enables you to roll your own encoding... and it makes the source smaller! It is scheduled (I hope) to go in to jQuery 1.2
http://jqueryjs.googlecode.com/svn/branches/jake-dev/ http://jqueryjs.googlecode.com/svn/branches/jake-dev/src/ajax/ajax.js down towards the bottom: pair is new, and param was changed... we've used it for iso8859-1 encoding, you should be able to use any custom encoding, if you add your own pair function $.fn.pair = function(f,v) {return encodeURIComponent(f) + "=" + encodeURIComponent(v)} is the new core function... you just need a function to encode utf into gb2312 On 7/5/07, Rhapidophyllum <[EMAIL PROTECTED]> wrote:
I think you don't have to change the entire server setting, but header information in your individual server responses should be set to gb. On Jul 4, 2007, at 11:29 AM, Guoliang Cao wrote: > > Hi, > > I'm using jQuery 1.1.3 in my AJAX-based game viewer. I download game > data through ajax calls. Game data are mostly encoded in gb2312. I > currently have a problem: if I don't change the server side setting to > send data in gb2312 format, I got unreadable characters on client > side. Is it possible to set encoding/charset when I make an ajax call? > The reason I don't like to change server side setting is I want to > minimize the effort of installing my application to any web site. > > For those who are interested, here is my game viewer: > http://www.daoqigame.com/jsgameviewer/index1.html > > Thank you. > > Guoliang >
-- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ