Skip to content

Commit

Permalink
UTF-8 as character encoding for SLDs
Browse files Browse the repository at this point in the history
This is the following of the previous incomplete PR11, generalizing
switch to UTF-8 for all styles.

Having the styles in ISO messes up things when an user edits them via
the UI editor from GS (as the UI is supposed to be full utf-8,
everything posted will be interpreted as UTF-8, not ISO, messing up the
charset).

Note: if we git grep onto 'ISO-8859' in the repository, there are still
some references, but on automated_tests layer ; a shapefile is provided
where the attributes are still encoded in this charset.
  • Loading branch information
pmauduit committed Aug 17, 2020
1 parent 22872ed commit aff8bb1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
14 changes: 7 additions & 7 deletions styles/raster.sld
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a Named Layer is the basic building block of an SLD document -->
<NamedLayer>
Expand All @@ -26,4 +26,4 @@
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
</StyledLayerDescriptor>
7 changes: 3 additions & 4 deletions www/styles/green.sld
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- a named layer is the basic building block of an sld document -->
<NamedLayer>
Expand All @@ -17,13 +17,12 @@
<Fill>
<!-- CssParameters allowed are fill (the color) and fill-opacity -->
<CssParameter name="fill">#66FF66</CssParameter>
</Fill>
</Fill>
<Stroke/>

</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>

2 changes: 1 addition & 1 deletion www/styles/remoteOws.sld
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
2 changes: 1 addition & 1 deletion www/styles/remoteTasmania.sld
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down

0 comments on commit aff8bb1

Please sign in to comment.