[GRASS-dev] [GRASS-user] Lost in encoding problem, v.in.ogr

On Thu, Feb 26, 2015 at 1:35 PM, Daniel Victoria <daniel.victoria@gmail.com>
wrote:

Hi List,

I'm having trouble importing a shapefile with v.in.ogr that has some
accented characters (like não, rodoviária).
The shapefile opend fine in QGIS and I can open the dbf on libreoffice,
setting the encoding to (windows-1252/winlatin 1).
I imported the shapefile and if I run v.db.select or if I open the
attribute data, accented characters are messed up. However, when I try to
query the layer, an error message (png attached) will show telling me to
check database settings and then gives me the reason for the failure. I can
then see that the queried attributes in this windows all have the accented
character.

Has anyone had any luck with accented characters in v.in.ogr? I tried
changing the encoding option in v.in.ogr but could not get it to work.
I'm using grass7 from OSGeo4Win. Attached is the shapefile that I'm trying
to import.

Try to specify the encoding in GUI settings -> Attributes -> encoding ->
windows-1252.
But it probably won't help with displaying in Attribute table manager.

To developers:
I am totally confused how the attribute encoding is currently implemented.
The ATM fails to display the characters correctly since environmental
variable GRASS_DB_ENCODING is not set. I can't find any place where it
would be set. The list of grass variable says that there is GRASS gisenv
variable GRASS_DB_ENCODING. Grep shows usage of GRASS_DB_ENCODING only in
gui and it is not set anywhere. Any idea someone?

Anna

Thanks
Daniel

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Just for the record:
http://trac.osgeo.org/grass/ticket/2453
http://lists.osgeo.org/pipermail/grass-dev/2014-April/068160.html

2015-02-27 5:16 GMT+02:00 Anna Petrášová <kratochanna@gmail.com>:

On Thu, Feb 26, 2015 at 1:35 PM, Daniel Victoria <daniel.victoria@gmail.com>
wrote:

Hi List,

I'm having trouble importing a shapefile with v.in.ogr that has some
accented characters (like não, rodoviária).
The shapefile opend fine in QGIS and I can open the dbf on libreoffice,
setting the encoding to (windows-1252/winlatin 1).
I imported the shapefile and if I run v.db.select or if I open the
attribute data, accented characters are messed up. However, when I try to
query the layer, an error message (png attached) will show telling me to
check database settings and then gives me the reason for the failure. I can
then see that the queried attributes in this windows all have the accented
character.

Has anyone had any luck with accented characters in v.in.ogr? I tried
changing the encoding option in v.in.ogr but could not get it to work.
I'm using grass7 from OSGeo4Win. Attached is the shapefile that I'm trying
to import.

Try to specify the encoding in GUI settings -> Attributes -> encoding ->
windows-1252.
But it probably won't help with displaying in Attribute table manager.

To developers:
I am totally confused how the attribute encoding is currently implemented.
The ATM fails to display the characters correctly since environmental
variable GRASS_DB_ENCODING is not set. I can't find any place where it would
be set. The list of grass variable says that there is GRASS gisenv variable
GRASS_DB_ENCODING. Grep shows usage of GRASS_DB_ENCODING only in gui and it
is not set anywhere. Any idea someone?

Anna

Thanks
Daniel

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Thanks Ana,

Setting the attributes / encoding to windows-1252 fixed the query results windows problem. But as you mentioned, it did not help with the Attribute table manager.

Also, v.db.select works from the command console in the layer manager but it does not work in the windows command line

Cheers

Daneil

···

On Fri, Feb 27, 2015 at 12:16 AM, Anna Petrášová <kratochanna@gmail.com> wrote:

On Thu, Feb 26, 2015 at 1:35 PM, Daniel Victoria <daniel.victoria@gmail.com> wrote:

Hi List,

I’m having trouble importing a shapefile with v.in.ogr that has some accented characters (like não, rodoviária).

The shapefile opend fine in QGIS and I can open the dbf on libreoffice, setting the encoding to (windows-1252/winlatin 1).
I imported the shapefile and if I run v.db.select or if I open the attribute data, accented characters are messed up. However, when I try to query the layer, an error message (png attached) will show telling me to check database settings and then gives me the reason for the failure. I can then see that the queried attributes in this windows all have the accented character.

Has anyone had any luck with accented characters in v.in.ogr? I tried changing the encoding option in v.in.ogr but could not get it to work.

I’m using grass7 from OSGeo4Win. Attached is the shapefile that I’m trying to import.

Try to specify the encoding in GUI settings → Attributes → encoding → windows-1252.
But it probably won’t help with displaying in Attribute table manager.

To developers:
I am totally confused how the attribute encoding is currently implemented. The ATM fails to display the characters correctly since environmental variable GRASS_DB_ENCODING is not set. I can’t find any place where it would be set. The list of grass variable says that there is GRASS gisenv variable GRASS_DB_ENCODING. Grep shows usage of GRASS_DB_ENCODING only in gui and it is not set anywhere. Any idea someone?

Anna

Thanks

Daniel


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user