1

In QGIS, I can't read characters of the shapefile in my geological layer attribute table : I don't understand or there are misunderstandable characters of shapefile.

Below a screenshot of the attribute table.. Does anyone know how I could get the original values back ?

screenshot of table of attributes of the geological map

  • 2
    Please choose one software package, then research support for UTF-8 strings and international character support, then edit this question to specify what you have attempted. – Vince Sep 13 '17 at 13:17
  • 1
    Create a .cpg file using a text editor with the same name of the layer(e.g. geological_map.cpg), and insert the Unicode encoding identifier `UTF-8' into it. – Amit Ghosh Sep 13 '17 at 18:50
  • I think it is quite easy the aswer for this question, I do not agree with having it on hold. The answer for a QGIS user is just going to Layer Properties->General->Data source encoding and look for the right encoding, many times UTF-8 fix it – Marco Sep 14 '17 at 12:09
  • @AmitGhosh (or Marco) You should post your comments as answers now the subject has been reopened – gisnside Sep 14 '17 at 16:32
5

As @Marco mentioned in the comment, look for the right encoding by changing the data source encoding from the layer properties window. The most probable choice is UTF-8

enter image description here

Most of the modern GIS softwares (including QGIS and ArcGIS) store the encoding information in an optional .cpg (code page)file. Therefore, you should create the same manually with proper encoding identifier (as mentioned in the comment) To create a .cpg file automatically in QGIS save (right click on the layer>save as) the layer and select the proper encoding. Then QGIS/ArcGIS will detect the proper encoding.

enter image description here

  • What if UTF-8 doesn't work as the encoding? I have a file that I have tried multiple different encodings and none of them convert the accents into the characters I would expect. How can I find the correct one? – user3386170 May 24 '18 at 18:11
  • I've same problem but in QGIS 3.4 in Linux (LMDE 3) Debian 9, Do you know how can I fix that I checked my ESRI Shapefiles layers are in UTF-8 by default – Predator X Apr 5 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.