[GRASS-dev] [GRASS GIS] #3548: sql where statement encoding issue on windows

GRASS GIS trac at osgeo.org
Fri Apr 20 03:26:12 PDT 2018


#3548: sql where statement encoding issue on windows
--------------------------+-----------------------------------------------
  Reporter:  martinl      |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  major        |  Milestone:  7.4.1
 Component:  Database     |    Version:  7.4.0
Resolution:               |   Keywords:  select, where, wingrass, encoding
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+-----------------------------------------------

Comment (by martinl):

 Tested also from command line:

 {{{
 # no diacritics, works
 C:\>db.select sql="select count(*) from obce where nazev='Kladno';
 count(*)
 2

 # diacritics involved, fails
 C:\>db.select sql="select count(*) from obce where nazev='Aš';
 count(*)
 0
 }}}

 Debug:

 {{{
 D2/5: path to db is
 C:\Users\landa\Documents\grassdata\ArcCR500\PERMANENT\sqlite

 D3/5: Escaped SQL: select count(*) from obce where nazev='Aš';
 D3/5: describe_table()
 D4/5: this is not a table column
 D3/5: sqltype = 3
 D3/5: litetype = 1
 D3/5: nkcols = 1
 D4/5: this is not a table column
 D3/5: sqltype = 3
 D3/5: litetype = 1
 D3/5: col: count(*), nkcols 0, litetype : 1, sqltype 3
 count(*)
 D3/5: fetch row = -1
 D3/5: col 0, litetype 1, sqltype 3: val = '0'
 D3/5: Row fetched
 0
 D3/5: fetch row = 0
 D3/5: db_close_database()
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3548#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list