Hello,
I was having problems with my SLD only because it contained
propertyNames in Japanese (double byte characters in UTF-8).
So what I did was get the latest source from trunk, and just changed from:
StyledLayerDescriptor sld = parseSld(new
ByteArrayInputStream(getMap.getSldBody()
.getBytes()));
to:
StyledLayerDescriptor sld = parseSld(new
ByteArrayInputStream(getMap.getSldBody()
.getBytes("UTF-8")));
in line 235 of org.geoserver.wms.map.GetMapKvpRequestReader.java, and
my maps are now displaying as expected.
It will really be nice if this very,very simple fix can get to the
main trunk. In fact, it will be a lot better if all String.getBytes()
contain the "UTF-8" encoding parameter to ensure that strings with
double byte characters will not get corrupted. This will make a lot of
people in this part of the world happy.
Thanks.
Mario.
Please open a bug report on jira and attach a patch to it, we'll apply
as time allows
Cheers
Andrea
On Tue, Oct 19, 2010 at 10:23 AM, Mario Basa <mario.basa@anonymised.com> wrote:
Hello,
I was having problems with my SLD only because it contained
propertyNames in Japanese (double byte characters in UTF-8).
So what I did was get the latest source from trunk, and just changed from:
StyledLayerDescriptor sld = parseSld(new
ByteArrayInputStream(getMap.getSldBody()
.getBytes()));
to:
StyledLayerDescriptor sld = parseSld(new
ByteArrayInputStream(getMap.getSldBody()
.getBytes("UTF-8")));
in line 235 of org.geoserver.wms.map.GetMapKvpRequestReader.java, and
my maps are now displaying as expected.
It will really be nice if this very,very simple fix can get to the
main trunk. In fact, it will be a lot better if all String.getBytes()
contain the "UTF-8" encoding parameter to ensure that strings with
double byte characters will not get corrupted. This will make a lot of
people in this part of the world happy.
Thanks.
Mario.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------
Andrea,
Just curious, is it possible to access the Character Set variable in
the Global Settings of the Geoserver console from a wms request?
I don't want to hard code "UTF-8" in the SLD's String.getByte()
parameter and was thinking that placing the global character set
variable will be better.
Thanks again.
Mario.
On Tue, Oct 19, 2010 at 6:24 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:
Please open a bug report on jira and attach a patch to it, we'll apply
as time allows
Cheers
Andrea
On Tue, Oct 19, 2010 at 10:23 AM, Mario Basa <mario.basa@anonymised.com> wrote:
Hello,
I was having problems with my SLD only because it contained
propertyNames in Japanese (double byte characters in UTF-8).
So what I did was get the latest source from trunk, and just changed from:
StyledLayerDescriptor sld = parseSld(new
ByteArrayInputStream(getMap.getSldBody()
.getBytes()));
to:
StyledLayerDescriptor sld = parseSld(new
ByteArrayInputStream(getMap.getSldBody()
.getBytes("UTF-8")));
in line 235 of org.geoserver.wms.map.GetMapKvpRequestReader.java, and
my maps are now displaying as expected.
It will really be nice if this very,very simple fix can get to the
main trunk. In fact, it will be a lot better if all String.getBytes()
contain the "UTF-8" encoding parameter to ensure that strings with
double byte characters will not get corrupted. This will make a lot of
people in this part of the world happy.
Thanks.
Mario.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------