7

When I import shapefile layers their encoding is System while the data is in UTF-8. How to change the default encoding to UTF-8? This question answer here " Is it possible to change default encoding for QGIS? " is no longer valid since in QGIS 3.12.3 there is no longer such option available in Data Sources. Has it just been moved to another place (where?) or is there any workaround?

4
  • 3
    Have you tried to add .cpg file? It is a plain text file that contains only the codepage id, for utf-8 UTF-8.
    – user30184
    Dec 7, 2020 at 12:14
  • 2
    Or you can try to set the environmental variable SHAPE_ENCODING=UTF-8 trac.osgeo.org/gdal/wiki/ConfigOptions#SHAPE_ENCODING but it seems that it would be applied to all shapefiles even if they were not UTF-8.
    – user30184
    Dec 7, 2020 at 12:29
  • 1
    You can also use the Python script provided here: gis.stackexchange.com/a/152551/107424 to change all layer encodings at once.
    – MrXsquared
    Dec 7, 2020 at 13:30
  • Thanks! The Python script solved my problem.
    – Mauno Aho
    Dec 10, 2020 at 9:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.