[mapserver-users] encoding problem when using variable runtime substitution
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Fri Jan 4 11:29:24 PST 2013
Hi,
I have a layer which connect to my postgis DB with client encoding
win1252.
CONNECTIONTYPE postgis
CONNECTION "host=serveurpg dbname=geo user=xxxpassword=xxx port=5432
options='-c client_encoding=WIN1252'"
That use to work for years, just before I start using variable
substitution.
My problem is when using runtime substitution in a FILTER
ex.: FILTER (periode = '%periode%' )
If I send a wms getmap request with the wms parameter periode = '2001 à
2003'
It seems that mapserver receive '2001 à 2003' encoded in utf-8, and tells
postgis that it is in win1252, so nothing is returned.
If I use CONNECTION "host=serveurpg dbname=geo user=xxxpassword=xxx
port=5432 options='-c client_encoding=utf-8'"
it works, but I don't want to do that because I'll have a lot of code and
mapfiles to change.
Is there a reason why mapserver would think a string is encoded in utf-8?
Maybe I'm totally on a wrong track, if so any idea where could be the
problem?
Thanks
steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130104/ef61d5fc/attachment.htm>
More information about the MapServer-users
mailing list