Hi Andrea,
I did not check your suggestion, since I was able to get it working with
running GS on OSX without using the raw=true parameter. So it should not be
necessary to do it differently on Windows.
I did try with GeoServer 2.12.x on Windows, but got the same results as with
earlier versions. Later this week I will spend some time checking if I can get
it working by changing the configuration on Windows.
Cheers,
Anton
> On 23 Sep 2017, at 11:14, Andrea Aime <[email protected]> wrote:
>
> And oh,
> one more thing, the REST API has been completely rewritten (implementation
> wise, not API wise)
> in GeoServer 2.12.x, you might want to try and see how it works there
>
> Cheers
> Andrea
>
>
> On Sat, Sep 23, 2017 at 11:09 AM, Andrea Aime <[email protected]
> <mailto:[email protected]>> wrote:
> Anton, did you try my suggestion at all?
> If that does not work, on windows try to set the jvm default encoding (Linux
> and OSX default to
> some UTF-8 variant, but I believe Windows uses something else):
>
> https://www.w3.org/International/articles/http-charset/index
> <https://www.w3.org/International/articles/http-charset/index>
>
> Where to set that depends a lot on how you installed (could be in the
> start.bat, in the
> service wrapper runner configuration, or in your Tomcat configuration too,
> I'm not familar
> with the details as I don't use Windows myself).
>
> If the latter solves the issue we might consider forcing UTF-8 as a default
> in the windows
> installation (will be hard to implement as we have chronic lack of devs on
> windows, but we
> can at least take note)
>
> Cheers
> Andrea
>
>
> On Sat, Sep 23, 2017 at 10:58 AM, Anton Bakker <[email protected]
> <mailto:[email protected]>> wrote:
> Hi all,
>
> Thanks for the replies and information. I tried running GeoServer on OSX and
> there no encoding issues occur with the hebrew characters in the SLD with the
> same requests. So I suppose it must a Windows specific configuration issue in
> Java/Jetty/GeoServer that is causing the encoding issue. Running GeoServer on
> Windows is not a must for me, but is convenient. So if anyone has ideas how
> to get GeoServer respect the utf-8 character encoding it would be really
> appreciated.
>
> Cheers,
> Anton
>
>
>
>> On 22 Sep 2017, at 11:35, Ian Turton <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> When I try on an Ubuntu 16.06 box everything works fine so it looks to be a
>> specific windows error.
>>
>> Ian
>>
>> On 22 September 2017 at 01:15, Daniel Baird <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> That definitely looks like an encoding issue. To make absolutely sure your
>> SLD is getting to GS with the right encoding, I would:
>>
>> - edit your SLD source with a good text editor and save it as UTF8
>> - add <?xml version="1.0" encoding="UTF-8"?> as the first line of your SLD
>> source
>> - use curl at the command line to add it to GS via REST, and make sure you
>> tell curl the content encoding with curl's header argument: -H
>> "Content-Type: text/html; charset=UTF-8"
>>
>>
>> On Thu, 21 Sep 2017 at 23:07 Andrea Aime <[email protected]
>> <mailto:[email protected]>> wrote:
>> Hi Anton,
>> I don't have experience with non western chars on the REST API, however, try
>> adding
>> "?raw=true" to your URL, to avoid GeoServer parsing and rewriting the style,
>> and see if that helps?
>>
>> Cheers
>> Andrea
>>
>>
>> On Thu, Sep 21, 2017 at 2:02 PM, Anton Bakker <[email protected]
>> <mailto:[email protected]>> wrote:
>> Hi list,
>>
>> I am running GeoServer 2.11.2 (platform independent binary on Windows 10, 64
>> bits), and GeoServer does not seem to be able to process an SLD which
>> contains Hebrew characters correctly, when created throught the REST API. I
>> created the SLD with the following POST request:
>>
>> POST http://daneel:8080/geoserver/rest/workspaces/cite/styles.sld
>> <http://daneel:8080/geoserver/rest/workspaces/cite/styles.sld> HTTP/1.1
>> Accept: text/xml
>> User-Agent: Mozilla/5.0 (Windows NT x.y; rv:10.0) Gecko/20100101 Firefox/10.0
>> Content-Type: application/vnd.ogc.sld+xml; charset=utf-8
>> Host: daneel:8080
>> Cookie: JSESSIONID=fh4cjqmg7n3b3lnwnfpujbnb
>> Content-Length: 1651
>> Expect: 100-continue
>>
>> BODY:
>> <StyledLayerDescriptor version="1.0.0"
>> xmlns="http://www.opengis.net/sld <http://www.opengis.net/sld>"
>> xmlns:ogc="http://www.opengis.net/ogc <http://www.opengis.net/ogc>"
>> xmlns:xlink="http://www.w3.org/1999/xlink <http://www.w3.org/1999/xlink>"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>> <http://www.w3.org/2001/XMLSchema-instance>"
>> xsi:schemaLocation="http://www.opengis.net/sld <http://www.opengis.net/sld>
>> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd
>> <http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd>">
>> <NamedLayer>
>> <Name>roads_hebrew</Name>
>> <UserStyle>
>> <Name>roads_hebrew</Name>
>> <Title>roads hebrew</Title>
>> <FeatureTypeStyle>
>> <Rule>
>> <Name>TypeRoad_1</Name>
>> <Title>TypeRoad_1</Title>
>> <PolygonSymbolizer>
>> <Fill>
>> <CssParameter name="fill-opacity">0</CssParameter>
>> </Fill>
>> </PolygonSymbolizer>
>> </Rule>
>> <Rule>
>> <Name>דרך אזורית קיימת/מאושרת</Name>
>> <Title>דרך אזורית קיימת/מאושרת</Title>
>> <ogc:Filter>
>> <ogc:PropertyIsEqualTo>
>> <ogc:PropertyName>TypeRoad_1</ogc:PropertyName>
>> <ogc:Literal>
>> <![CDATA[דרך אזורית קיימת/מאושרת]]>
>> </ogc:Literal>
>> </ogc:PropertyIsEqualTo>
>> </ogc:Filter>
>> <LineSymbolizer>
>> <Stroke>
>> <CssParameter name="stroke">#FF5500</CssParameter>
>> <CssParameter name="stroke-width">1.2</CssParameter>
>> <CssParameter name="stroke-linecap">round</CssParameter>
>> </Stroke>
>> </LineSymbolizer>
>> </Rule>
>> </FeatureTypeStyle>
>> </UserStyle>
>> </NamedLayer>
>> </StyledLayerDescriptor>
>>
>> Inspecting the SLD we just uploaded through the REST API with the following
>> request:
>>
>> GET
>> http://daneel:8080/geoserver/rest/workspaces/cite/styles/roads_hebrew.sld
>> <http://daneel:8080/geoserver/rest/workspaces/cite/styles/roads_hebrew.sld>
>> HTTP/1.1
>> Host: daneel:8080
>> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101
>> Firefox/55.0
>> Accept:
>> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8;charset=utf-8
>> Accept-Language: en-US,en;q=0.5
>> Accept-Encoding: gzip, deflate
>> Cookie: JSESSIONID=1d2nnunq6zl6c1kd6ytulxv6nt
>> Authorization: Basic YWRtaW46Z2Vvc2VydmVy
>> Connection: keep-alive
>> Upgrade-Insecure-Requests: 1
>>
>> RESPONSE BODY:
>>
>> <?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor
>> xmlns="http://www.opengis.net/sld <http://www.opengis.net/sld>"
>> xmlns:sld="http://www.opengis.net/sld <http://www.opengis.net/sld>"
>> xmlns:gml="http://www.opengis.net/gml <http://www.opengis.net/gml>"
>> xmlns:ogc="http://www.opengis.net/ogc <http://www.opengis.net/ogc>"
>> version="1.0.0">
>> <sld:NamedLayer>
>> <sld:Name>roads_hebrew</sld:Name>
>> <sld:UserStyle>
>> <sld:Name>roads_hebrew</sld:Name>
>> <sld:Title>roads hebrew</sld:Title>
>> <sld:FeatureTypeStyle>
>> <sld:Name>name</sld:Name>
>> <sld:Rule>
>> <sld:Name>TypeRoad_1</sld:Name>
>> <sld:Title>TypeRoad_1</sld:Title>
>> <sld:PolygonSymbolizer>
>> <sld:Fill>
>> <sld:CssParameter name="fill-opacity">0</sld:CssParameter>
>> </sld:Fill>
>> </sld:PolygonSymbolizer>
>> </sld:Rule>
>> <sld:Rule>
>> <sld:Name>דרך �זורית
>> קיימת/מ�ושרת</sld:Name>
>> <sld:Title>דרך �זורית
>> קיימת/מ�ושרת</sld:Title>
>> <ogc:Filter>
>> <ogc:PropertyIsEqualTo>
>> <ogc:PropertyName>TypeRoad_1</ogc:PropertyName>
>> <ogc:Literal>דרך �זורית
>> קיימת/מ�ושרת</ogc:Literal>
>> </ogc:PropertyIsEqualTo>
>> </ogc:Filter>
>> <sld:LineSymbolizer>
>> <sld:Stroke>
>> <sld:CssParameter name="stroke">#FF5500</sld:CssParameter>
>> <sld:CssParameter
>> name="stroke-linecap">round</sld:CssParameter>
>> <sld:CssParameter
>> name="stroke-width">1.2</sld:CssParameter>
>> </sld:Stroke>
>> </sld:LineSymbolizer>
>> </sld:Rule>
>> </sld:FeatureTypeStyle>
>> </sld:UserStyle>
>> </sld:NamedLayer>
>> </sld:StyledLayerDescriptor>
>>
>>
>> Also in the GeoServer web ui the SLD looks scrambled:
>>
>> https://i.imgur.com/IP5fbeP.png <https://i.imgur.com/IP5fbeP.png>
>>
>> I tried to set the UTF-8 encoding for the java environment, by adding the
>> JAVA OPTION Dfile.encoding to the start.bat startup script:
>>
>> "%RUN_JAVA%" %JAVA_OPTS% -Dfile.encoding=UTF-8
>> -DGEOSERVER_DATA_DIR="%GEOSERVER_DATA_DIR%" -Djava.awt.headless=true
>> -DSTOP.PORT=8079 -DSTOP.KEY=geoserver -jar start.jar
>>
>> But this did not make any difference.
>>
>> Another thing I tried was setting a xml header (as suggested in this thread:
>> http://osgeo-org.1560.x6.nabble.com/SLD-encoding-problem-td5046063.html
>> <http://osgeo-org.1560.x6.nabble.com/SLD-encoding-problem-td5046063.html>)
>> to the SLD that is being posted to GeoServer, that includes the character
>> encoding, but did not solve the issue either.
>>
>> A colleague of mine tried the same on a Ubuntu machine, with the locale set
>> to (as suggested in the earlier mentioned mail list thread), with similar
>> results:
>>
>> LANG=en_US.UTF-8
>> LANGUAGE=en_US.UTF-8
>> LC_CTYPE="en_US.UTF-8"
>> LC_NUMERIC=fr_CH.UTF-8
>> LC_TIME="en_US.UTF-8"
>> LC_COLLATE="en_US.UTF-8"
>> LC_MONETARY="en_US.UTF-8"
>> LC_MESSAGES="en_US.UTF-8"
>> LC_PAPER="en_US.UTF-8"
>> LC_NAME="en_US.UTF-8"
>> LC_ADDRESS="en_US.UTF-8"
>> LC_TELEPHONE="en_US.UTF-8"
>> LC_MEASUREMENT="en_US.UTF-8"
>> LC_IDENTIFICATION="en_US.UTF-8"
>> LC_ALL=
>>
>>
>>
>> Can anyone shine light on what is happening here? Seems to me it is a bug in
>> GeoServer, or are my colleague and me missing something in our GeoServer
>> configuration?
>>
>> Btw, I opened up a probably related issue on the issue tracker earlier
>> today: https://osgeo-org.atlassian.net/projects/GEOS/issues/GEOS-8295
>> <https://osgeo-org.atlassian.net/projects/GEOS/issues/GEOS-8295>.
>>
>>
>> Thanks and kind regards,
>> Anton Bakker
>>
>> software developer@geocat <http://www.geocat.net/>
>> tel. +31 318 416 664 <tel:+31%20318%20416%20664>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org <http://slashdot.org/>!
>> http://sdm.link/slashdot <http://sdm.link/slashdot>
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to this
>> list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> <http://www.ianturton.com/talks/foss4g.html#/>
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>> <http://geoserver.org/comm/userlist-guidelines.html>
>>
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
>>
>>
>>
>>
>> --
>> Regards,
>> Andrea Aime
>> ==
>> GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
>> <http://goo.gl/it488V> for more information.
>> ==
>>
>> Ing. Andrea Aime
>> @geowolf
>> Technical Lead
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A
>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>> 55054
>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>> Massarosa
>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>> (LU)
>> phone: +39 0584 962313 <tel:+39%200584%20962313>
>> fax: +39 0584 1660272 <tel:+39%200584%20166%200272>
>> mob: +39 339 8844549 <tel:+39%20339%20884%204549>
>>
>> http://www.geo-solutions.it <http://www.geo-solutions.it/>
>> http://twitter.com/geosolutions_it <http://twitter.com/geosolutions_it>
>>
>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>> Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
>> file/s allegato/i sono da considerarsi strettamente riservate. Il loro
>> utilizzo è consentito esclusivamente al destinatario del messaggio, per le
>> finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio
>> senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia
>> via e-mail e di procedere alla distruzione del messaggio stesso,
>> cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo
>> anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per
>> finalità diverse, costituisce comportamento contrario ai principi dettati
>> dal D.Lgs. 196/2003.
>>
>> The information in this message and/or attachments, is intended solely for
>> the attention and use of the named addressee(s) and may be confidential or
>> proprietary in nature or covered by the provisions of privacy act
>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>> Code).Any use not in accord with its purpose, any disclosure, reproduction,
>> copying, distribution, or either dissemination, either whole or partial, is
>> strictly forbidden except previous formal approval of the named
>> addressee(s). If you are not the intended recipient, please contact
>> immediately the sender by telephone, fax or e-mail and delete the
>> information in this message that has been received in error. The sender does
>> not give any warranty or accept liability as the content, accuracy or
>> completeness of sent messages and accepts no responsibility for changes
>> made after they were sent or for other risks which arise as a result of
>> e-mail transmission, viruses, etc.
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org <http://slashdot.org/>!
>> http://sdm.link/slashdot
>> <http://sdm.link/slashdot>_______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to this
>> list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> <http://www.ianturton.com/talks/foss4g.html#/>
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>> <http://geoserver.org/comm/userlist-guidelines.html>
>>
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org <http://slashdot.org/>!
>> http://sdm.link/slashdot <http://sdm.link/slashdot>
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to this
>> list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> <http://www.ianturton.com/talks/foss4g.html#/>
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>> <http://geoserver.org/comm/userlist-guidelines.html>
>>
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
>>
>>
>>
>>
>> --
>> Ian Turton
>
>
>
>
> --
> Regards,
> Andrea Aime
> ==
> GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
> <http://goo.gl/it488V> for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054 Massarosa (LU)
> phone: +39 0584 962313 <tel:+39%200584%20962313>
> fax: +39 0584 1660272 <tel:+39%200584%20166%200272>
> mob: +39 339 8844549 <tel:+39%20339%20884%204549>
>
> http://www.geo-solutions.it <http://www.geo-solutions.it/>
> http://twitter.com/geosolutions_it <http://twitter.com/geosolutions_it>
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
> Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
> file/s allegato/i sono da considerarsi strettamente riservate. Il loro
> utilizzo è consentito esclusivamente al destinatario del messaggio, per le
> finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio
> senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia
> via e-mail e di procedere alla distruzione del messaggio stesso,
> cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo
> anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per
> finalità diverse, costituisce comportamento contrario ai principi dettati dal
> D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named addressee(s).
> If you are not the intended recipient, please contact immediately the sender
> by telephone, fax or e-mail and delete the information in this message that
> has been received in error. The sender does not give any warranty or accept
> liability as the content, accuracy or completeness of sent messages and
> accepts no responsibility for changes made after they were sent or for other
> risks which arise as a result of e-mail transmission, viruses, etc.
>
>
>
>
> --
> Regards,
> Andrea Aime
> ==
> GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
> <http://goo.gl/it488V> for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054 Massarosa (LU)
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39 339 8844549
>
> http://www.geo-solutions.it <http://www.geo-solutions.it/>
> http://twitter.com/geosolutions_it <http://twitter.com/geosolutions_it>
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
> Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
> file/s allegato/i sono da considerarsi strettamente riservate. Il loro
> utilizzo è consentito esclusivamente al destinatario del messaggio, per le
> finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio
> senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia
> via e-mail e di procedere alla distruzione del messaggio stesso,
> cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo
> anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per
> finalità diverse, costituisce comportamento contrario ai principi dettati dal
> D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named addressee(s).
> If you are not the intended recipient, please contact immediately the sender
> by telephone, fax or e-mail and delete the information in this message that
> has been received in error. The sender does not give any warranty or accept
> liability as the content, accuracy or completeness of sent messages and
> accepts no responsibility for changes made after they were sent or for other
> risks which arise as a result of e-mail transmission, viruses, etc.
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users