[OpenLayers-Users] Ajax.Request and charset problem
Arnd Wippermann
arnd.wippermann at web.de
Wed Jun 20 18:26:05 EDT 2007
Hello list,
I have problems to get the right response with Ajax.
This is a line, i get from Mapserver with the GetFeatureInfo-Request:
LINES|289|Böhler Weg - Obere Böhle|2|TREPPE|87|6|7|SG07_Böhler...
With firebug I can see, that the content-type is text/html and the charset
ISO-8859-1.
I want to use Ajax to fetch the GetFeatureInfo-Request, parse the line,
build some html and put it in the web side.
When I try to get the result with an Ajax.Request call, i get ? instead of
ö.
This is the request, I use:
var myAjax = new OpenLayers.Ajax.Request(
theUrl,
{
method: 'get',
parameters: theParams,
requestHeaders: ['Content-Type', 'text/html', 'charset',
'ISO-8859-1'],
onComplete: showResponseWMSGetFeatureInfo,
onFailure: showResponseFailureWMSGetFeatureInfo
});
Firebug shows for the headers, the same as above.
I have looked into the Ajax-code, googled for an answer, tried utf-8 and so
on, but i have nothing found, what helps.
My hope is, that someone here have an idea to get the right chars.
Mit freundlichen Grüssen
Arnd Wippermann
http://gis.ibbeck.de/ginfo/
More information about the Users
mailing list