Opened 14 years ago
Last modified 13 years ago
#3297 new defect
WFS libxml encoding
Reported by: | assefa | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 6.2 release |
Component: | WFS Server | Version: | unspecified |
Severity: | normal | Keywords: | WFS 1.1.0 libxml encoding |
Cc: | nsavard, tomkralidis, dmorissette |
Description
I run into issues with french accents not being outputted properly in the get capabilities document for WFS 1.1 (WFS 1.1 GetCapabilities uses libxml)
The map file was saved as ISO-8859-1 with the correct characters using for accents.
From what I can understand from the http://xmlsoft.org/encoding.html, I believe we should be converting the texts to UTF-8 when inserting nodes.
Attachments (2)
Change History (8)
by , 14 years ago
Attachment: | mapwfs11.c.patch added |
---|
comment:1 by , 14 years ago
The following patch encodes name,title,abstract at the layer level.
Tom, what do you think about this bug?
comment:2 by , 14 years ago
Thanks for the patch. I wonder whether we should apply this logic to all libxml2 based code (i.e. mapogcsos.c)? Probably a convenience function/wrapper around msGetEncodedString?
comment:3 by , 14 years ago
Sorry for the delay. I added a convenience function msOWSCommonxmlNewChildEncoded. r9788
encoding is now used on name, title, abstract, keywords. Probably other elements needs to be encoded also (like things in the contact for example). It is not done for now.
Yes I think It should be also used for SOS (like offerings for example). I will enter a bug in the SOS component.
comment:4 by , 14 years ago
Cc: | added |
---|
Reviewing this, I think we need to support 2 levels of encoding:
- map encoding (encoding used by the map file)
- layer encoding (encoding used by the data)
I believe this will allow us to control exactly the encoding for the OWS requests. Right now for example, a WMS GetFeatureInfo request will not be able to produce a correct result if the data and/or map file using one encoding and we want the whole result back in a another encoding.
There are bugs and threads related to this:
- http://trac.osgeo.org/mapserver/ticket/3148
- thread: http://lists.osgeo.org/pipermail/mapserver-dev/2009-May/008766.html
The possibilities would be to have an encoding keyword on map and layer level and use that where ever it should be used. The other possibility is to have the encoding limited to ows services and their gml ouptut and use metadata to define map/layer level encoding.
comment:5 by , 14 years ago
I see what you are getting at and think dealing with encodings can have uses and implications for general MapServer uses and not just OWS. We've already got ENCODING at the LABEL level, so whatever we do will need to be compatible with that as well.
I suggest we discuss the solution on the -dev list to get feedback from everyone and to avoid turning this ticket into a long and messy discussion.
comment:6 by , 13 years ago
Milestone: | 6.0 release → 6.2 release |
---|
setting it to 6.2. this has come a couple of time in the mailing list but was never addressed.
possible patch