Hi Justin,
as per setting up the correct encoding for all xml output, I had to add a WFS
constructor argument to FeatureResponse and GeometryResponse, and set the
<constructor-arg ref="wfs"/> argument in applicationContext.xml to both
beans.
That is so write(Object value, OutputStream output, Operation operation)
can do
encoder.setEncoding(wfs.getCharSet());
If you have any objection with that speak now before I commit
regards,
Gabriel
Hi Gabriel,
Sorry, did not see this before. Sounds good to me. Question for you: Did we decide that it would be better to keep on using OWS.getCharSet() (which passes through to GeoServer.getCharSet()), rather then just use the latter directly?
-Justin
Gabriel Roldán wrote:
Hi Justin,
as per setting up the correct encoding for all xml output, I had to add a WFS constructor argument to FeatureResponse and GeometryResponse, and set the <constructor-arg ref="wfs"/> argument in applicationContext.xml to both beans.
That is so write(Object value, OutputStream output, Operation operation)
can do
encoder.setEncoding(wfs.getCharSet());
If you have any objection with that speak now before I commit
regards,
Gabriel
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
!DSPAM:4007,47ec0a34218941849620573!
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
On Friday 28 March 2008 01:20:15 am Justin Deoliveira wrote:
Hi Gabriel,
Sorry, did not see this before. Sounds good to me. Question for you: Did
we decide that it would be better to keep on using OWS.getCharSet()
(which passes through to GeoServer.getCharSet()), rather then just use
the latter directly?
we did.
[15:59] <jdeolive> groldan: hi
[15:59] <groldan> hi there
[15:59] <groldan> hey, I'm trying to make my head around GEOS-1815 (ensure all
xml output explicity sets charset from GeoServer.getCharSet())
[16:00] <groldan> seems like a hard thing to do, but first
[16:00] <groldan> I wonder if that's really the intent
[16:00] <groldan> I mean
[16:00] <groldan> I seem to remember
[16:00] <jdeolive> groldan: it might be...
[16:00] <jdeolive> one thing
[16:00] <groldan> if a request came with a given encoding, it was desirable
for the response to use the same encoding?
[16:00] <groldan> (not that its happening right now, but still)
[16:00] <jdeolive> when i did wfs 1.1 work... i added WFS.getCharSet() as a
wya to configure wfs =
[16:01] <jdeolive> which was wrong... so in the least that bug should be
replace WFS.getCharSet() with GeoServer.getCharSet()
[16:01] <groldan> you mean OWS.getCharset()
[16:01] <jdeolive> right
[16:02] <groldan> ok, charsets are used all around with a hard to guess
purpose
[16:03] <groldan> for example, there's a SetCharacterEncodingFilter
[16:03] <groldan> then Dispatcher sets the request charset in
preprocessRequest, if it was not set
[16:03] <groldan> and I guess the request charset is only meant to provide a
steady way to parse the request
[16:03] <groldan> but we do not want to use the user provided charset to
encode the result?
[16:04] <jdeolive> groldan: not sure... i think so ?
[16:04] <aaime> you can be almost certain that it's not gs issue
[16:04] <jdeolive> i too am not 100% sure what needs to be done
[16:04] <jdeolive> i think aaime handled the original issue... he might be
able to comment better
[16:05] <groldan> so, we need a deal or I'll be lurking around the whole day
[16:05] <groldan> how about this
[16:05] <groldan> lets make sure all responses use the GeoServer.getCharset()
[16:05] <groldan> to encode xml responses
[16:06] <groldan> then at least we'll have a single entry point where to fix
if the request charset shall be used
[16:06] <jdeolive> groldan: that sounds good, i think that is the most we can
logically do
[16:06] <groldan> (I'm pretty sure using the request charset for the response
came through as a user requirement a time ago, though not sure we ever did
that)
[16:13] <groldan> jdeolive: OWS.getCharset() seems good. As long as we move it
to Service and make it delegate to getGeoServer().getCharset()
[16:13] <groldan> rationale: Service.getCharset() returns the character
encoding for the service xml responses. It comming from the GeoServer
configuration class is an implementation detail irrelevant for the rest of
the service
[16:14] <jdeolive> which Service class?
[16:14] <groldan> Service extends OWS
[16:14] <jdeolive> ahh
[16:14] <jdeolive> yeah that makes sense
[16:14] <aaime> groldan
[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] <jdeolive> so there is no confusion
[16:15] <aaime> that complained german chars are not properly encoded in
geoserver 1.6 anymore
[16:15] <-- oterral123 has left this server.
[16:15] <jdeolive> it is something i did not intend to make it to trunk
[16:15] <aaime> I looked in 1.5.x
[16:15] <groldan> I see it as good practice rather than confusion, if we make
it as I told above
[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] <groldan> ok, aaime, what were the user request?
[16:15] <aaime> how you do that it's your business
[16:16] <aaime> groldan, please, give me a second to finish
[16:16] * groldan shuts up
[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
[16:18] <groldan> mechanical + overhead for a man that does not touches the
services in about 2.5 years
[16:19] <groldan> so that seems good jdeolive/aaime, thanks for the
clarification
[16:19] <jdeolive> groldan: np... sorry that issue is not all that well
defined
[16:19] * jdeolive should spend more time when creating issue reports
[16:20] <aaime> groldan, here is the thread:
http://www.nabble.com/charSet-Settings-will-be-ignored-to16114926.html#a16114926
[16:20] <sigq> Title: Nabble - charSet Settings will be ignored (at
www.nabble.com)
[16:20] <groldan> when I say keep Service.getCharset and make it delegate to
getGeoServer().getCharset() is just to favour the law of Demeter
[16:20] <aaime> don't talk to strangers
[16:20] <aaime> I'm ok with it, np
[16:21] <aaime> groldan, just one thing
[16:21] <groldan> yup
[16:21] <aaime> don't follow that rule on the users ml
[16:21] <groldan> lol
Gabriel.
-Justin
Gabriel Roldán wrote:
> Hi Justin,
>
> as per setting up the correct encoding for all xml output, I had to add a
> WFS constructor argument to FeatureResponse and GeometryResponse, and set
> the <constructor-arg ref="wfs"/> argument in applicationContext.xml to
> both beans.
>
> That is so write(Object value, OutputStream output, Operation operation)
> can do
> encoder.setEncoding(wfs.getCharSet());
>
> If you have any objection with that speak now before I commit
>
> regards,
>
> Gabriel
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketpl
>ace _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel