6

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.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Mauno Aho
  • 69
  • 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 07 '20 at 12:14
  • 2
    Or you can try to set the environmental variable SHAPE_ENCODING=UTF-8 https://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 07 '20 at 12:29
  • 1
    You can also use the Python script provided here: https://gis.stackexchange.com/a/152551/107424 to change all layer encodings at once. – MrXsquared Dec 07 '20 at 13:30
  • Thanks! The Python script solved my problem. – Mauno Aho Dec 10 '20 at 09:20

0 Answers0