Bug report #8440

Encoding problems that occur when a shapefile layer is saved as a new shapefile

Added by Minoru Akagi about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17209

Description

The problems occur only in case that the "Ignore shapefile encoding declaration" option is not checked. I guess that some modifications are needed since multiple OgrFeatureIterator support was adapted. The procedure to reproduce the problems is below:

1. prepare a shapefile not in UTF-8. Set proper LDID or create a cpg file
2. uncheck the "Ignore shapefile encoding declaration" option
3. load the shapefile into QGIS
4. save the shapefile layer as a new shapefile. Select either the encoding of the source or UTF-8. Do not check the "Add saved file to map" option
5. open the attribute table of the source layer
Then the attribute strings will be garbled.

6. load the output shapefile into QGIS and open the attribute table
Then you will be able to see garbled attribute strings on the table.

Associated revisions

Revision 6899a175
Added by Minoru Akagi about 6 years ago

If ignoreShapeEncoding is false, clear SHAPE_ENCODING after creating shapefile with SHAPE_ENCODING="" (fix #8440)
Spit: apply SHAPE_ENCODING to shape layer opening

Revision b05abdf8
Added by Marco Hugentobler about 6 years ago

Merge pull request #800 from minorua/8440

If ignoreShapeEncoding is false, clear SHAPE_ENCODING after creating shapefile with SHAPE_ENCODING="" (fix #8440)

History

#1 Updated by Minoru Akagi about 6 years ago

pull request to fix this issue: https://github.com/qgis/Quantum-GIS/pull/800

#2 Updated by Marco Hugentobler about 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF