Re: [Qgis-user] Shapefile with file .cpg(codepage)
Hi Claas, this is a very useful hint, which I didn't know yet. Thank you very much. Regards Burghardt > -Ursprüngliche Nachricht- > Von: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] Im Auftrag von > Claas Leiner > Gesendet: Donnerstag, 7. Juli 2016 16:17 > An: qgis-user@lists.osgeo.org > Betreff: Re: [Qgis-user] Shapefile with file .cpg(codepage) > > Hi, > > QGIS uses the .cpg file when you deselect the Option "Ignore shapefile > encoding declaration" > > You find it: > Settings > Options > Data Sources > > Then there are no encoding-problems tu use QGIS with Shapefiles in in a > mixed environment. > > Cheers > > Claas > > > -- > - > GKG-Kassel - Dr.-Ing. Claas Leiner > QGIS-Support und mehr > > Geodatenservice, Kartenwerkstatt & > GIS-Schule Kassel > > Wilhelmshöher Allee 304 E > 34131 Kassel > Tel. 0561/56013445 > claas.lei...@gkg-kassel.de > http://www.gkg-kassel.de > > Unterstützen Sie QGIS > QGIS-DE e.V. | http://qgis.de > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Shapefile with file .cpg(codepage)
Hi, I wonder why this is not the default? If a .cpg file is present, one can assume that the information is correct. Probably in some edge cases it may be false, but in the majority I assume the .cpg files to contain correct information. Andreas On 2016-07-07 16:17, Claas Leiner wrote: > Hi, > > QGIS uses the .cpg file when you deselect the Option "Ignore shapefile > encoding declaration" > > You find it: > Settings > Options > Data Sources > > Then there are no encoding-problems tu use QGIS with Shapefiles in in a mixed > environment. > > Cheers > > Claas > > -- > - > GKG-Kassel - Dr.-Ing. Claas Leiner > QGIS-Support und mehr > > Geodatenservice, Kartenwerkstatt & > GIS-Schule Kassel > > Wilhelmshöher Allee 304 E > 34131 Kassel > Tel. 0561/56013445 > claas.lei...@gkg-kassel.de > http://www.gkg-kassel.de > > Unterstützen Sie QGIS > QGIS-DE e.V. | http://qgis.de > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Shapefile with file .cpg(codepage)
Hi, QGIS uses the .cpg file when you deselect the Option "Ignore shapefile encoding declaration" You find it: Settings > Options > Data Sources Then there are no encoding-problems tu use QGIS with Shapefiles in in a mixed environment. Cheers Claas -- - GKG-Kassel - Dr.-Ing. Claas Leiner QGIS-Support und mehr Geodatenservice, Kartenwerkstatt & GIS-Schule Kassel Wilhelmshöher Allee 304 E 34131 Kassel Tel. 0561/56013445 claas.lei...@gkg-kassel.de http://www.gkg-kassel.de Unterstützen Sie QGIS QGIS-DE e.V. | http://qgis.de ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Shapefile with file .cpg(codepage)
Hi Even, the encoding is often a source of confusion. I work in a mixed environment, me on Linux (so UTF-8 is the "System"-default), the rest is using on Windows (with Windows-1252 I assume) Transfering shapes often results in crippled data, and I have not found workflows/settings that this will not happen. Is there anything I can do about it, so we do not have to adjust things manually all the time, or first look if the codepage is correctly set ? Cheers Bernd Am 07.07.2016, 12:58 Uhr, schrieb Even Rouault : 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. Andrea, 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. Even -- Bernd Vogelgesang Siedlerstraße 2 91083 Baiersdorf/Igelsdorf Tel: 09133-825374 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Shapefile with file .cpg(codepage)
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. Andrea, 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. Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Shapefile with file .cpg(codepage)
Hi, QGIS is using OGR to read/write shapefiles. http://www.gdal.org/drv_shapefile.html does not mention the .cpg files, so I assume, OGR does not support them. If you want to see this addressed, I would contact the GDAL/OGR devs. Andreas On 2016-07-07 12:46, burghardt.scho...@stadt.wolfsburg.de wrote: > Hi, > I would say that QGIS does not use the .cpg file. But you have the > possibility to make the correct encoding in the layer properties under > "General -> Layer info -> Data source encoding". > > Regards > Burghardt > >> -Ursprüngliche Nachricht- >> Von: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] Im Auftrag von >> Andrea Peri >> Gesendet: Donnerstag, 7. Juli 2016 12:16 >> An: qgis-user >> Betreff: [Qgis-user] Shapefile with file .cpg(codepage) >> >> 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. >> :) >> >> Thx, >> >> -- >> - >> Andrea Peri >> . . . . . . . . . >> qwerty àèìòù >> - >> ___ >> Qgis-user mailing list >> Qgis-user@lists.osgeo.org >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Shapefile with file .cpg(codepage)
Hi, I would say that QGIS does not use the .cpg file. But you have the possibility to make the correct encoding in the layer properties under "General -> Layer info -> Data source encoding". Regards Burghardt > -Ursprüngliche Nachricht- > Von: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] Im Auftrag von > Andrea Peri > Gesendet: Donnerstag, 7. Juli 2016 12:16 > An: qgis-user > Betreff: [Qgis-user] Shapefile with file .cpg(codepage) > > 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. > :) > > > Thx, > > -- > - > Andrea Peri > . . . . . . . . . > qwerty àèìòù > - > ___ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Shapefile with file .cpg(codepage)
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. :) Thx, -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user