[OpenLayers-Users] encoding international characters

Duarte Carreira DCarreira at edia.pt
Sun Apr 22 08:03:11 EDT 2007


Hi all.

I've been trying to use WMS as a generic layer for querying an inventory. I
add a few custom parameters that are processed by an asp. The map images are
created according to the query parameters and returned to ol as it were a
'normal' wms response.

Everything works fine until I need to pass a string with international
characters. These are not correctly escaped or encoded by ol, or at least I
cannot make any sense of it.

For instance "ALCÁCER" should encode to "ALC%C1CER", that's what the browser
does if I write the query in the address box.
But ol encodes to "ALC%C3%81CER". On the server, this does not map to
"ALCÁCER" and so the query fails.
Spaces are encoded correctly, so I'm guessing the problem occurs only with
non-US characters like "Á" (accentuated A).

How can I avoid this problem? Where can I remove the encoding ol applies to
WMS requests?

There is a live example of this problem at: www.cotr.pt/cotrinv/teste.html.
The gray areas on the center of the map should appear magenta. If you can
see the urls being passed by ol (using FF Tools/Page info/media), you'll see
the encoding problem.

Thanks,
Duarte



-- 
View this message in context: http://www.nabble.com/encoding-international-characters-tf3626355.html#a10125903
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list