[GRASS5] [bug #4339] (grass) v.digit cannot update sqlite table

this bug's URL: http://intevation.de/rt/webrt?serial_num=4339
-------------------------------------------------------------------------

Subject: v.digit cannot update sqlite table

Platform: GNU/Linux/x86
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: grass-6.1.cvs_src_snapshot_2006_04_15

While digitizing into a new vector coverage using the sqlite driver, I get the following error when the Form dialog attempts to update the attribute table:

WARNING: Cannot update table
D0/0: Name = cat
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to koi8-r
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "where": syntax error

Steps to reproduce:

Step 1. Link Grass to the sqlite driver:

sqlite3 -version

3.2.8

db.connect -p

driver:sqlite
database:/home/data/grass/UTM10_NAD83/pugetsound/sqlite3.db
schema:(null)
group:(null)

Step 2. Start digitizing a new (empty) vector:

v.digit -n map=newvect

Map does not exist. Add flag -n to create a new map.
New empty map created.

Step 3. Create an attribute table for this vector from the Open Settings > Table > Create Table dialog

(Should see dialog that Table was successfuly created)

Step 4. Digitize a new line

A dialog called "Form" (bad name) opens with an attribute tab:

New record was created

cat: 1

Assume data encoding as:

utf-8
ascii
iso8859-1
koi8-r

I selected utf-8 (I'm on Ubuntu Linux) and clicked submit. That's when I recieved the error:

WARNING: Cannot update table
D0/0: Name = cat
D0/0: Name = _grass_internal_database_encoding
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to
D0/0: Name = _grass_internal_database_encoding
Could not set Tcl system encoding to
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near "where": syntax error

-------------------------------------------- Managed by Request Tracker