[OpenLayers-Users] [OpenLayers-Dev] OpenLayers.Request.POST an
encoding
Tim Schaub
tschaub at opengeo.org
Wed Mar 18 18:12:04 EDT 2009
Hey-
Dipl. Inf. Carsten Eider wrote:
> Hi list,
>
> i am using OpenLayers.Request.POST to send some xml data to
> a servlet. This data includes the famous german special charactesr like
> "ÜÖÄßüöä".
> Using tomcat on windows nearly everything works fine,
> using it on linux it fails
> The special characters result in "Ã?öÃ1/4ÃÃÃÃ"
> I know it is a encoding issue, but i don't know how to solve it
>
> Can i set the encoding on OpenLayers.Request.POST?
var request = OpenLayers.Request.POST({
url: "http://host/path",
data: "ÜÖÄßüöä",
headers: {
"Content-Type": "text/plain; charset=utf-8"
},
callback: handler
});
or charset=ISO-8859-1 if that's what you're sending
See:
http://www.w3.org/International/O-charset
http://docs.openlayers.org/library/request.html
Tim
>
> Any reactions are apreciated.
>
> Tia Carsten
>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
--
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
More information about the Users
mailing list