[QGIS-trac] [Quantum GIS] #2707: Corruption of national characters in attribute columns when inserting/editing object in PostGIS

Quantum GIS qgis at qgis.org
Wed May 12 16:37:59 EDT 2010


#2707: Corruption of national characters in attribute columns when
inserting/editing object in PostGIS
---------------------------------------------------------+------------------
   Reporter:  imincik1                                   |              Owner:  nobody       
       Type:  bug                                        |             Status:  new          
   Priority:  critical: causes crash or data corruption  |          Milestone:  Version 1.5.0
  Component:  Digitising                                 |            Version:  HEAD         
   Keywords:  postgis                                    |   Platform_version:               
   Platform:  Debian                                     |           Must_fix:  Yes          
Status_info:  0                                          |  
---------------------------------------------------------+------------------
 There is corruption of attribute data containing national characters when
 creating or editing new objects in PostGIS. The problem every time occurs
 after some objects are successfully inserted. I can not figure out exact
 operation causing this issue.

 Here is example how can I reproduce problem:

 1. I have following spatial table:
 CREATE TABLE gis.rrr
 (
   gid serial NOT NULL,
   test character varying(80),
   the_geom geometry,
   CONSTRAINT rrr_pkey PRIMARY KEY (gid),
   CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
   CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) =
 'MULTIPOLYGON'::text OR the_geom IS NULL),
   CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = (-1))
 )

 2. Table is empty before this test. 'ľšč' are slovak national characters.
 I will try to do following operations:
 - start editing; create one object and insert 'ľšč' in to column 'test';
 save
 - start editing; create one object and insert 'ľšč' in to column 'test';
 save
 - start editing; create one object and insert 'ľšč' in to column 'test';
 save
 - start editing; create one object and insert 'ľšč' in to column 'test';
 save
 - start editing; create some more objects and insert 'ľšč' in to column
 'test'; save
 - start editing; create some more objects and insert 'ľšč' in to column
 'test'; save
 - identify attributes of some features
 - start editing; create some more objects and insert 'ľšč' in to column
 'test'; save
 - identify attributes of some features
 ....
 somewhere here I will see in the log and also in attribute table that I
 have something like 'ľščťžý' instead of 'ľšč' in column 'text'.

 I see this problem for longer time with multiple versions. 1.3 - trunk,
 tested on multiple Debian Lenny systems.

 Current test was made using this software:
 QGIS: 13321M
 OS: Debian Lenny
 PostGIS: POSTGIS="1.3.3" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec
 2007" USE_STATS
 database encoding: UTF-8
 locales: tested with en_US, sk_SK

 PostGIS log is attached.

 Ivan

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2707>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list