double quotes in expression

Bill Binko bill at BINKO.NET
Thu May 12 18:48:28 EDT 2005


On Thu, 12 May 2005, Steve Lime wrote:

> You could:
>
>  1) Write your expression like so using single quotes:
>
>     EXPRESSION 'Symbol (12, 1, "ESRI IGL Font20", 1)'
>
>  2) Perhaps consider looking for sub-strings with regular expressions? Depends on how the values differ though from symbol to symbol (that is is the 12, the 1, the "ESRI IGL Font20" or the 1 really important):
>
>     EXPRESSION /ESRI IGL FONT 20/
>
> Steve


Steve,

Is there an escape character in Mapserver strings?  For example, does \"
mean a literal quotation mark?

I can imagine times where the switch to single quotes won't help, for
example, someone with polycap tablenames in a PostGIS connection (note the
other running thread on this and the postgis-users board).

DATA "geom from (SELECT geom, oid from \"PolyCapTableName\" where feature
= 'FooBar') as foo using unique oid using SRID 123"

Since 'FooBar' needs the single quotes for PostGIS, using single quotes
for the whole thing won't work.

Looking at the code, it looks like something could be done in maplexer.c
or mapfile.c to perform that escape on reading the strings.  It might help
solve alot of these issues.

Just a thought

Bill



More information about the mapserver-users mailing list