Bug report #2707

Corruption of national characters in attribute columns when inserting/editing object in PostGIS

Added by Ivan Mincik over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Digitising
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12767

Description

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

postgresql-8.3-main.log.gz - PostGIS log (6.62 KB) Ivan Mincik, 2010-05-12 01:38 PM

Associated revisions

Revision d8adf0be
Added by Jürgen Fischer over 11 years ago

fix #2707

git-svn-id: http://svn.osgeo.org/qgis/trunk/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision 64d2fc82
Added by Jürgen Fischer over 11 years ago

fix #2707

git-svn-id: http://svn.osgeo.org/qgis/[email protected] c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Jürgen Fischer over 11 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in 64d2fc82 (SVN r13471).

Also available in: Atom PDF