[Geoserver-users] GetFeatureInfo, UTF-8 not declared

Hi,

Taken from

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1

The “charset” parameter is used with some media types to define the character set (section 3.4) of the data. When no explicit charset parameter is provided by the sender, media subtypes of the “text” type are defined to have a default charset value of “ISO-8859-1” when received via HTTP. Data in character sets other than “ISO-8859-1” or its subsets MUST be labeled with an appropriate charset value.

It looks like when Geoserver sends out something else than ISO-8859-1 the character set should be marked. We had sometimes troubles with Finnish characters and uDig even we used ISO-8859-1, the default character set.

-Jukka Rahkonen-

···

Andrea Aime wrote:

On Tue, Apr 23, 2013 at 10:47 AM, sores <sores@anonymised.com> wrote:

Hi Andrea,

Thanks for the response!

In both cases I use Tomcat. I have checked the response with wfetch, and Geoserver 1.7.2 behavior is different from Geoserver 2.3.0. The problem only occurres when GetFeatureInfo format is text/plain, otherwise charset is defined in the html or xml header. Unfortunately, Geonetwork seem to use text/plain. However, the root of the problem is the ambiguous output of Geoserver.

If there is no way to make Geonetwork assume that the undefined charset is UTF-8, is there any workaround for the problem in Geoserver or tomcat?

Not that I know of. As said before, I have a hard time considering this a bug too, I don’t remember OGC demanding the charset to be added to the

mime types.

Cheers

Andrea

==

GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


On Tue, Apr 23, 2013 at 11:32 AM, Rahkonen Jukka
<jukka.rahkonen@anonymised.com>wrote:

Hi,****

** **

Taken from ****

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1****

** **

The "charset" parameter is used with some media types to define the
character set (section 3.4) of the data. When no explicit charset parameter
is provided by the sender, media subtypes of the "text" type are defined to
have a default charset value of "ISO-8859-1" when received via HTTP. Data
in character sets other than "ISO-8859-1" or its subsets MUST be labeled
with an appropriate charset value.****

** **

It looks like when Geoserver sends out something else than ISO-8859-1 the
character set should be marked. We had sometimes troubles with Finnish
characters and uDig even we used ISO-8859-1, the default character set.

Interesting. Please open a bug report then.
To anyone reading the message: patches gladly accepted :-p

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Thanks Andrea!

Can you please, direct me to a document that explains how to report a bug?

Regards,

Laszlo

···

Hi,

Taken from

http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1

The “charset” parameter is used with some media types to define the character set (section 3.4) of the data. When no explicit charset parameter is provided by the sender, media subtypes of the “text” type are defined to have a default charset value of “ISO-8859-1” when received via HTTP. Data in character sets other than “ISO-8859-1” or its subsets MUST be labeled with an appropriate charset value.

It looks like when Geoserver sends out something else than ISO-8859-1 the character set should be marked. We had sometimes troubles with Finnish characters and uDig even we used ISO-8859-1, the default character set.

Interesting. Please open a bug report then.
To anyone reading the message: patches gladly accepted :-p
Cheers
Andrea

==
GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it

On Tue, Apr 23, 2013 at 1:35 PM, sores <sores@anonymised.com> wrote:

**

Thanks Andrea!

Can you please, direct me to a document that explains how to report a bug?

We don't have such a thing, but in short:
- register on xircles.codehaus.org to get an account
- go to jira.codehaus.org and open a bug report

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------