Le jeudi 07 juillet 2016 12:16:17, Andrea Peri a écrit :
> Hi,
> I have some shapefiles with an extra file having extension .cpg.
> The .cpg extension is a optional extension for declaration of Code-Page.
> Is this file knowed and supported from QGIS 2.14. ?
> I don't know if the qgis when loading a shapefile is using the ogr or
> instead is using an own shapefile provider, but however I don't know
> if gdal is knowing and using this .cpg file.


OGR does use the .cpg file when present (I'm just updating 
http://gdal.org/drv_shapefile.html since it only mentions the reading of the 
codepage byte in the DBF header, but the .cpg presence overrides that) and 
QGIS uses OGR to read shapefiles.

But, in QGIS, the default behaviour is to make OGR *not* use the encoding 
detected by the OGR shapefile driver and use instead the user defined encoding 
in the GUI. Unless you go to Settings / Options / Data Sources and uncheck the 
"Ignore shapefile encoding declaration", in which case OGR will manage the 
transcoding itself.


Spatialys - Geospatial professional services
Qgis-user mailing list
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to