[Qgis-developer] Attribute values changes in SHAPE FILE on save (even though the attributes weren't edited)

Casper Børgesen (CABO) CABO at NIRAS.DK
Fri Aug 19 02:54:05 PDT 2016


I have a shape file in QGIS (2.16.1 and master 0a07fee) with one polygon and around 20 attributes. According to the TableManager plugin two of these fields have the type "String(1)" and outside QGIS I can tell that their value is HEX 20 (a space character).

After changing the geometry a bit I save the layer. The result is that also the attributes are changed (the DBF file). There are differences in the header, where the "change date" has been updated [1]. But also the two fields of type "String(1)" are updated:

    HEX 20 (the space) is changed to HEX 3F (a question mark).

In front of one of the two fields 10 characters are changed from HEX 20 to HEX 2A (a *).

My initial thoughts are encoding, badly defined shape file or finally a bug in the way QGIS handles the shapefile.


Can anyone give me a hint as to why this is happening?


Regards, Casper


[1]: http://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160819/a1aeb4d7/attachment.html>


More information about the Qgis-developer mailing list