GeoServer

ensure all xml output explicity sets charset from GeoServer.getCharSet()

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.2
  • Fix Version/s: 1.6.3, 1.7.0-beta1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

some code does not even set it, others use wfs.getCharSet().

Activity

Hide
Gabriel Roldán added a comment -

[16:14] <aaime> that issue was one I opened in response to a user request
[16:14] <jdeolive> although OWS.getCharSet() might just be something we want to kill completely
[16:15] <aaime> that complained german chars are not properly encoded in geoserver 1.6 anymore
[16:15] <aaime> I looked in 1.5.x
[16:15] <aaime> and there is plenty of places that do use GeoServer.getCharset()
[16:15] <aaime> we should reinstate all the previous charset settings
[16:15] <aaime> how you do that it's your business
[16:16] <aaime> but you have to make sure every xml encoder
[16:16] <aaime> receives the proper charset
[16:16] <aaime> at the momet we have one case where ows.getCharset is called
[16:16] <aaime> and your fix is as good as any
[16:16] <aaime> but there are other places where the charset was set in 1.5.x
[16:16] <aaime> and it's not anymore today
[16:17] <aaime> so the fix is not only to reroute that ows.gecharset call
[16:17] <aaime> but also to do a similar encoder.setCharset call
[16:17] <aaime> in every other gs services
[16:17] <aaime> that does output xml
[16:17] <aaime> (done)
[16:17] <aaime> looking for that mail
[16:18] <groldan> in a word it is to make sure all xml responses use GeoServer.getCharset() as the encoding scheme?
[16:18] <aaime> yep
[16:18] <groldan> ok, thanks
[16:18] <aaime> which is mechanical, but not exactly a 5 minutes one

Show
Gabriel Roldán added a comment - [16:14] <aaime> that issue was one I opened in response to a user request [16:14] <jdeolive> although OWS.getCharSet() might just be something we want to kill completely [16:15] <aaime> that complained german chars are not properly encoded in geoserver 1.6 anymore [16:15] <aaime> I looked in 1.5.x [16:15] <aaime> and there is plenty of places that do use GeoServer.getCharset() [16:15] <aaime> we should reinstate all the previous charset settings [16:15] <aaime> how you do that it's your business [16:16] <aaime> but you have to make sure every xml encoder [16:16] <aaime> receives the proper charset [16:16] <aaime> at the momet we have one case where ows.getCharset is called [16:16] <aaime> and your fix is as good as any [16:16] <aaime> but there are other places where the charset was set in 1.5.x [16:16] <aaime> and it's not anymore today [16:17] <aaime> so the fix is not only to reroute that ows.gecharset call [16:17] <aaime> but also to do a similar encoder.setCharset call [16:17] <aaime> in every other gs services [16:17] <aaime> that does output xml [16:17] <aaime> (done) [16:17] <aaime> looking for that mail [16:18] <groldan> in a word it is to make sure all xml responses use GeoServer.getCharset() as the encoding scheme? [16:18] <aaime> yep [16:18] <groldan> ok, thanks [16:18] <aaime> which is mechanical, but not exactly a 5 minutes one
Hide
Gabriel Roldán added a comment -

applied to WCS 1.0 in 1.6.x and trunk, and 1.1 in trunk.

The easy part is when the response is made through an org.geotools.xml.Transformer, since setting Transformer.setEncoding(Charset) does the trick.

Show
Gabriel Roldán added a comment - applied to WCS 1.0 in 1.6.x and trunk, and 1.1 in trunk. The easy part is when the response is made through an org.geotools.xml.Transformer, since setting Transformer.setEncoding(Charset) does the trick.
Hide
Gabriel Roldán added a comment -

For WMS, the following xml responses were updated to correctly encode content in the configured character set scheme:

  • getCapabilities
  • describeLayer
  • getMap output formats: KML, KMZ, GEORSS, ATOM

getFeatureInfo/gml was already behaving fine

Show
Gabriel Roldán added a comment - For WMS, the following xml responses were updated to correctly encode content in the configured character set scheme:
  • getCapabilities
  • describeLayer
  • getMap output formats: KML, KMZ, GEORSS, ATOM
getFeatureInfo/gml was already behaving fine
Hide
Gabriel Roldán added a comment -

For org.geotools.xml.Encoder based output formats, I've added the method Encoder.setEncoding(Charset)
for WFS, the following needed to change to set the encoding:

Show
Gabriel Roldán added a comment - For org.geotools.xml.Encoder based output formats, I've added the method Encoder.setEncoding(Charset) for WFS, the following needed to change to set the encoding:

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: