msEncodeUrl and #
Bart van den Eijnden (OSGIS)
bartvde at OSGIS.NL
Fri Dec 1 05:14:13 EST 2006
It does appear to properly encode, so the problem must be elsewhere. Sorry
for the noise.
#include "map.h"
int main(int argc, char *argv[])
{
char *encodedstr;
encodedstr = msEncodeUrl("<StyledLayerDescriptor version='1.0.0'
xmlns='http://www.opengis.net/sld'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.opengis.net/sld
http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd'><NamedLayer><Name>contour_etmaal</Name><UserStyle><FeatureTypeStyle><Rule><TextSymbolizer><Label><ogc:PropertyName>MIN_MAX</ogc:PropertyName></Label><Font><CssParameter
name='font-color'>#000000</CssParameter><CssParameter
name='font-family'>arial</CssParameter><CssParameter
name='font-size'>8</CssParameter></Font></TextSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>");
fprintf(stdout, "result is: %s", encodedstr);
exit(0);
}
Outputs:
[bart at hades mapserver-4.8.4-bart]$ ./test
result is:
%3CStyledLayerDescriptor+version%3D%271%2E0%2E0%27+xmlns%3D%27http%3A%2F%2Fwww%2Eopengis%2Enet%2Fsld%27+xmlns%3Axsi%3D%27http%3A%2F%2Fwww%2Ew3%2Eorg%2F2001%2FXMLSchema%2Dinstance%27+xsi%3AschemaLocation%3D%27http%3A%2F%2Fwww%2Eopengis%2Enet%2Fsld+http%3A%2F%2Fschemas%2Eopengeospatial%2Enet%2Fsld%2F1%2E0%2E0%2FStyledLayerDescriptor%2Exsd%27%3E%3CNamedLayer%3E%3CName%3Econtour%5Fetmaal%3C%2FName%3E%3CUserStyle%3E%3CFeatureTypeStyle%3E%3CRule%3E%3CTextSymbolizer%3E%3CLabel%3E%3Cogc%3APropertyName%3EMIN%5FMAX%3C%2Fogc%3APropertyName%3E%3C%2FLabel%3E%3CFont%3E%3CCssParameter+name%3D%27font%2Dcolor%27%3E%23000000%3C%2FCssParameter%3E%3CCssParameter+name%3D%27font%2Dfamily%27%3Earial%3C%2FCssParameter%3E%3CCssParameter+name%3D%27font%2Dsize%27%3E8%3C%2FCssParameter%3E%3C%2FFont%3E%3C%2FTextSymbolizer%3E%3C%2FRule%3E%3C%2FFeatureTypeStyle%3E%3C%2FUserStyle%3E%3C%2FNamedLayer%3E%3C%2FStyledLayerDescriptor%3E
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
--------- Oorspronkelijk bericht --------
Van: Bart van den Eijnden OSGIS <bartvde at OSGIS.NL>
Naar: MAPSERVER-DEV at LISTS.UMN.EDU <MAPSERVER-DEV at LISTS.UMN.EDU>
Onderwerp: [UMN_MAPSERVER-DEV] msEncodeUrl and #
Datum: 01/12/06 07:14
> Hi list,
>
> running into a problem with Ionic WMS versus Mapserver WMS client.
>
> It seems msEncodeUrl does not encode # to %23 for SLD color codes.
>
> Can anybody confirm this?
>
> Thanks in advance.
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
More information about the mapserver-dev
mailing list