rjuncu
11 Aug 2010, 6:55 AM
Hi,
I have all my html pages using the iso-8859-1 charset, so, I have to use in my Ajax requests, this charset too.
My code looks like this :
Ext.Ajax.request({
url: '/perl/Parametrage/elementGestion_extjs.pl'
,method: 'POST'
,jsonData: {'name' : 'nimportequoi èéà'}
,defaultHeaders: {
'Content-Type': 'application/json; charset=iso-8859-1'
}
Well, the problem is, that in firebug I found always the value 'application/json; charset=UTF-8' for the request header.
I've also tried to set headers property of Ext.Ajax.request and the defaultHeaders property for Ext.Ajax global or Ext.lib.Ajax.
I've tried too to debug to see where the header is changed, couldn't figure out either.
The real problem is that I have to post some latin characters (àéè ...) but I found them in the request string as 'é' 'è' or 'à '
I see that Ext.encode doesn't change these values, in Firebug the postData value passed to the XmlHttpRequest object seems all right.
I use Ext 3.2
Any idea is welcome.
I have all my html pages using the iso-8859-1 charset, so, I have to use in my Ajax requests, this charset too.
My code looks like this :
Ext.Ajax.request({
url: '/perl/Parametrage/elementGestion_extjs.pl'
,method: 'POST'
,jsonData: {'name' : 'nimportequoi èéà'}
,defaultHeaders: {
'Content-Type': 'application/json; charset=iso-8859-1'
}
Well, the problem is, that in firebug I found always the value 'application/json; charset=UTF-8' for the request header.
I've also tried to set headers property of Ext.Ajax.request and the defaultHeaders property for Ext.Ajax global or Ext.lib.Ajax.
I've tried too to debug to see where the header is changed, couldn't figure out either.
The real problem is that I have to post some latin characters (àéè ...) but I found them in the request string as 'é' 'è' or 'à '
I see that Ext.encode doesn't change these values, in Firebug the postData value passed to the XmlHttpRequest object seems all right.
I use Ext 3.2
Any idea is welcome.