Bug report #8440
Encoding problems that occur when a shapefile layer is saved as a new shapefile
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
If ignoreShapeEncoding is false, clear SHAPE_ENCODING after creating shapefile with SHAPE_ENCODING="" (fix #8440)
Spit: apply SHAPE_ENCODING to shape layer opening
History
#1 Updated by Minoru Akagi about 11 years ago
pull request to fix this issue: https://github.com/qgis/Quantum-GIS/pull/800
#2 Updated by Marco Hugentobler about 11 years ago
- Status changed from Open to Closed
Fixed in changeset b05abdf81d6a552570f3ecb69fac12698b279b75.