Opened 10 years ago

Last modified 4 years ago

#1005 new defect

db.out.ogr together with g.parser doesn't play nicely with non-lati characters containing DSN

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Default Version: svn-releasebranch64
Keywords: wingrass Cc:
CPU: x86-32 Platform: MSWindows Vista

Description

Select any table and set DNS to contain non-latin characters. I added -x, also echo before g.parser and before v.out.ogr. Output when running from CLI:

GRASS 6.4.0svn (latvija3)> db.out.ogr input=autoceli dsn="C:\Users\Maris\Documen
ts\Šaursliežu dzelzceļš\šaurā datubāze"
+ '[' -z 'C:/Program Files/GRASS-64-SVN' ']'
+ '[' input=autoceli '!=' @ARGS_PARSED@ ']'
+ echo 'Calling g.parser with following args: C:/Program Files/GRASS-64-SVN/scri
pts/db.out.ogr input=autoceli' 'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļ
š\šaurā datubāze'
Calling g.parser with following args: C:/Program Files/GRASS-64-SVN/scripts/db.o
ut.ogr input=autoceli dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā da
tubāze
+ exec g.parser 'C:/Program Files/GRASS-64-SVN/scripts/db.out.ogr' input=autocel
i 'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā datubāze'
DSN value before calling v.out.ogr: C:\Users\Maris\Documents\¾aurslieŲu dzelzceė
Õ\Õaur? datub?ze
ERROR 1: Failed to create directory C:\Users\Maris\Documents\Šaursliežu dzelzceļ
š\šaurā datubāze
for shapefile datastore.

KŽ█DA:Unable to open OGR data source 'C:\Users\Maris\Documents\Šaursliežu
      dzelzceļš\šaurā datubāze'

GRASS 6.4.0svn (latvija3)> db.out.ogr input=autoceli dsn="C:\Users\Maris\Documen
ts\Šaursliežu dzelzceļš\šaurā datubāze" format=CSV
+ '[' -z 'C:/Program Files/GRASS-64-SVN' ']'
+ '[' input=autoceli '!=' @ARGS_PARSED@ ']'
+ echo 'Calling g.parser with following args: C:/Program Files/GRASS-64-SVN/scri
pts/db.out.ogr input=autoceli' 'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļ
š\šaurā datubāze' format=CSV
Calling g.parser with following args: C:/Program Files/GRASS-64-SVN/scripts/db.o
ut.ogr input=autoceli dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā da
tubāze format=CSV
+ exec g.parser 'C:/Program Files/GRASS-64-SVN/scripts/db.out.ogr' input=autocel
i 'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā datubāze' format=CSV
DSN value before calling v.out.ogr: C:\Users\Maris\Documents\¾aurslieŲu dzelzceė
Õ\Õaur? datub?ze
Atvainojiet, <datubāze> ir nedrŅgs parametrs

GRASS 6.4.0svn (latvija3)>

Output when running from wxgui:

(Sun Mar 14 18:33:22 2010)                                                      
db.out.ogr input=autoceli dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā datubāze format=CSV
+ '[' -z 'C:/Program Files/GRASS-64-SVN' ']'
+ '[' input=autoceli '!=' @ARGS_PARSED@ ']'
+ echo 'Calling g.parser with following args: C:/Program
Files/GRASS-64-SVN/scripts/db.out.ogr input=autoceli'
'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā
datubāze' format=CSV
+ exec g.parser 'C:/Program
Files/GRASS-64-SVN/scripts/db.out.ogr' input=autoceli
'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā
datubāze' format=CSV
Calling g.parser with following args: C:/Program Files/GRASS-64-SVN/scripts/db.out.ogr input=autoceli dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā datubāze format=CSV
DSN value before calling v.out.ogr: C:\Users\Maris\Documents\¾aurslieŲu dzelzceėÕ\Õaurƒ datubƒze
Atvainojiet, <datubƒze> ir nedrīgs parametrs
(Sun Mar 14 18:33:23 2010) Command finished (0 sec)                             
(Sun Mar 14 18:33:40 2010)                                                      
db.out.ogr input=autoceli dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā datubāze
+ '[' -z 'C:/Program Files/GRASS-64-SVN' ']'
+ '[' input=autoceli '!=' @ARGS_PARSED@ ']'
+ echo 'Calling g.parser with following args: C:/Program
Files/GRASS-64-SVN/scripts/db.out.ogr input=autoceli'
'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā
datubāze'
+ exec g.parser 'C:/Program
Files/GRASS-64-SVN/scripts/db.out.ogr' input=autoceli
'dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā
datubāze'
Calling g.parser with following args: C:/Program Files/GRASS-64-SVN/scripts/db.out.ogr input=autoceli dsn=C:\Users\Maris\Documents\Šaursliežu dzelzceļš\šaurā datubāze
DSN value before calling v.out.ogr: C:\Users\Maris\Documents\¾aurslieŲu dzelzceėÕ\Õaurƒ datubƒze
ERROR 1: Failed to create directory
C:\Users\Maris\Documents\¾aurslieŲu dzelzceėÕ\Õaurƒ datubƒze
for shapefile datastore.
ERROR: Unable to open OGR data source 'C:\Users\Maris\Documents\¾aurslieŲu dzelzceėÕ\Õaurƒ datubƒze'
(Sun Mar 14 18:33:40 2010) Command finished (0 sec)                             

No problems observed when running on Linux with UTF-8 locale. Also there are no problems when pointing v.out.ogr (from wxgui) to DSN that contains non-latin characters.

WinGRASS-6.4.SVN-r41428-1 running Windows Vista with region set to Latvia.

Change History (4)

comment:1 Changed 9 years ago by neteler

Does the problem persist?

comment:2 Changed 9 years ago by marisn

Yes.

WinGRASS-6.4.SVN-r45559-1 WxGUI

Traceback (most recent call last):
  File "c:/osgeo4w/usr/src/grass64_release/dist.i686-pc-
mingw32/etc/wxpython/gui_modules/menuform.py", line 956, in
OnRun
  File "c:/osgeo4w/usr/src/grass64_release/dist.i686-pc-
mingw32/etc/wxpython/gui_modules/goutput.py", line 444, in
RunCmd
UnicodeEncodeError
:
'ascii' codec can't encode character u'\u0161' in position
66: ordinal not in range(128)

CLI

GRASS 6.4.1svn (Spearfish60)> db.out.ogr input=bugsites dsn="C:\Users\tests\Docu
ments\šaursliežu dzelzceļš\šaurā datubāze"
ERROR 1: Failed to create directory C:\Users\tests\Documents\šaursliežu dzelzceļ
š\šaurā datubāze
for shapefile datastore.

KŽ█DA:Unable to open OGR data source 'C:\Users\tests\Documents\šaursliežu
      dzelzceļš\šaurā datubāze'

It seems to work from CLI, if I don't specify output file name, just folder. Still it creates a new folder with strange name: "C:\Users\tests\Documents\ÕaurslieØu? dzelzceëÕ"

CLI continued (<fails> is not a valid parameter):

GRASS 6.4.1svn (Spearfish60)> db.out.ogr input=bugsites dsn="C:\Users\tests\Docu
ments\šaursliežu dzelzceļš\šis fails.csv" format=CSV
Atvainojiet, <fails> ir nedrŅgs parametrs

Can't test 6.5 due to bug #1297

comment:3 Changed 9 years ago by hellik

Milestone: 6.4.06.4.2

comment:4 Changed 4 years ago by neteler

Milestone: 6.4.26.4.6
Note: See TracTickets for help on using tickets.