Oscar, JavaScript provides native encoding capabilities for UTF-8 only. jQuery's ajax functionality merely uses the native encodeURIComponent method that JavaScript provides. If your server depends on processing 8859 then you need to do one of the following:
1. Do not use ajax for these pages. 2. Add support in the ASP page to convert UTF-8 into 8859. 3. Write your own JavaScript encoder to convert the data before sending it on the client. Setting headers on the client using beforeSubmit or beforeSend does not do anything to effect how the data is encoded. jQuery prepares ajax data in $.param and if you look at that method you will see that uses encodeURIComponent unconditionally. In my opinion, server pages that an not capable of processing or converting UTF-8 data are not good candidates for ajax targets. Mike
Hi Mike, Then: There are not way to do a ajax call with charset iso8859¿? I can not add any header or something like that beforeSubmit in order to force iso8859 instead Of utf-8 ¿? My problem is I can not change the charset of asp pages which recives the ajax call. I feel a little bit idiot!!! On 3 jun, 19:28, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > > I always recommend going full utf when you have this kind of problem... > > Same here. jQuery is only going to submit UTF-8 because it uses > encodeURIComponent (as it should). If you need a different charset on > the server then that's where you'll need to convert it. > > Mike