[jQuery] Re: Setting the request header contentType

2009-02-02 Thread Rik
I think there is no way. I've made some experiments with a hex editor to be sure. Simple script with $.ajax via post. data: "test=à" manually typed in a non UTF-8 script file Server side script: if(isset($_POST['test'])){ $test=utf8_decode($_POST['test']) . ' - ' . $_POST['test'];

[jQuery] Re: Setting the request header contentType

2008-12-31 Thread Romain Viovi
Hell yeah, after reading jquery's method $.param, i understood that the encodeURIComponent is used to serialize object. And after reading ECMA spec about this function, I understood that only UTF-8 is outputed ! So, I understand that it's perfectly ok to utf8_decode() what I receive serverside i

[jQuery] Re: Setting the request header contentType

2008-12-31 Thread Alexandre Plennevaux
did you try playing with the $.ajax scriptCharset option ? see: http://docs.jquery.com/Ajax/jQuery.ajax On Wed, Dec 31, 2008 at 1:27 PM, AdrianMG wrote: > > I am not pretty sure but I think you can work with UTF8 only in AJAX, > but I recommend you work with UTF8 always > > On Dec 30, 2:09 pm, R

[jQuery] Re: Setting the request header contentType

2008-12-31 Thread AdrianMG
I am not pretty sure but I think you can work with UTF8 only in AJAX, but I recommend you work with UTF8 always On Dec 30, 2:09 pm, Romain Viovi wrote: > Hello Everybody, > > I'm experiencing some problems with the $.ajax > > When sending simple post request, request Headers (logged with firebug