[OpenLayers-Users] RE Encoding in features attributes

Juanma M. R. juanma.mr at gmail.com
Fri Oct 9 07:54:17 PDT 2015


Hi,

Sorry, I mixed a little bit both things in the same phrase. I can see
correctly stored data in postgis (it has UTF8 encoding in the database)
with PGAdmin. I can see also correctly in firebug the WFS communication.

The WFS server is version 1.1.0 based on Mapserver 6.4.

Finally I got the string correctly shown from OL feature by decoding it
from UTF8. I needed to include a js library with the functionallity to
decode/encode UTF8. It seems firebug show OL vars without applying any
decoding but OL stored them correctly.

This makes me thinking of how OL stored strings. I assume it stores
whatever it receives and is the aplication using it in charge of
encoding/decoding, isn't it? Or maybe it has a encoding parameter or
functions to be used when retrieving strings from OL objects?

Thank you for being patient with my previous badly writen email. After
rereading it I realized it was not clear enought.

Regards,

Juan Manuel Moreno Rivera.

Sección de Teledetección y SIG / Remote Sensing & GIS group

Instituto de Desarrollo Regional / Institute for Regional Development

Universidad de Castilla-La Mancha / University of Castilla-La Mancha

Tlf: +34 967599200 (Ext: 2627)
http://www.teledeteccionysig.es/

2015-10-09 16:21 GMT+02:00 <Steve.Toutant at inspq.qc.ca>:

> What do you mean by "WFS response are correctly shown in pgadmin"
>
> Is your postgis database use encoding utf-8?
>
> What is your wfs server and version?
>
>
> *"Juanma M. R." <juanma.mr at gmail.com
> <juanma.mr at gmail.com>>@lists.osgeo.org <http://lists.osgeo.org>*
> Envoyé par : "Users" <openlayers-users-bounces at lists.osgeo.org>
>
> 2015-10-09 05:57
> A
> openlayers-users at lists.osgeo.org
> cc
> Objet
> [OpenLayers-Users] Encoding in features attributes
>
>
>
>
>
>
> Dear list,
>
> I have a WFS layer already loaded in Openlayers 2.13 version. The problem
> is that some attributes are spanish characters and are not shown correctly.
>
> I have checked and in database and WFS response are correctly shown in
> pgadmin and firebug. When checking feature attributes already loaded in
> OpenLayers with firebug it shows them with strange characters. The webpage
> OL is loaded is in UTF8 encoding.
>
> I have looked in OL documentation for some kind of encoding parameter for
> WFS layer / protocol. Is OL using any internal encoding or maybe firebug
> assumes something in WFS communication that OL do not?
>
> Regards,
> Juan Manuel Moreno Rivera.
>
> Sección de Teledetección y SIG / Remote Sensing & GIS group
>
> Instituto de Desarrollo Regional / Institute for Regional Development
>
> Universidad de Castilla-La Mancha / University of Castilla-La Mancha
>
> Tlf: +34 967599200 (Ext: 2627)
>
> *http://www.teledeteccionysig.es/* <http://www.teledeteccionysig.es/>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20151009/f508888c/attachment.html>


More information about the Users mailing list