10

I have a shapefile with names for Regions. These don't seem to contain special characters "Ä", "Ü", "Ö", "ß" but ugly hieroglyphs.

What can I do to display them correctly. If I import the shape as UTF-8 it doesn't work.

The names are in a dbase table. So is it possible to save a dbase table in UTF-8 or is there a different way of dealing with it?

2

5 Answers 5

19

enter image description here

try opening the dbase-file with libreoffice (or openoffice) and try different encodings, if utf-8 doesnot work try iso-8859-1 and look if the chars öäüß are displayed correctly

9

In newer versions of QGIS you can right click the layer and select properties. In the first tab there is a section about layer information with the options for data source encoding. You can select UTF-8 there. Sorry for the German screen shot but since the question was about German characters...

enter image description here

6

Your shapefile is most probably in UTF-8, but qgis 1.8.0 has a bug in correct encoding of shapefiles. Until this is solved, you can try this workaround in Windows:

Browse to C:\Programs\Quantum GIS Lisboa\bin on Windows XP or C:\Programs (x86)\Quantum GIS Lisboa\bin on Windows 7. Look for qgis.bat and open it with a suitable editor (I have installed notepad++ for such things). After line 1, insert:

SET SHAPE_ENCODING=UTF-8

0
0

No I solved the problem: I opened the dbf file in LibreOffice as UTF8, put in the special characters and saved it. That was it. Very simple!

2
  • 1
    sounds like @Kurt solved your problem. Please consider marking his answer as correct to close this question. Commented Aug 22, 2012 at 23:15
  • Yes, I used the same method when facing the problems with destroyed Czech characters - used the same Libreoffice spreadsheet to produce the source CSV for my layer and after saving the layer as SHP, I saved the data from LibreOffice as UTF8 DBF table and simply replaced the DBF in tha shapefile with this one. However, the UTF8 bug is really annoying.
    – Juhele
    Commented Feb 15, 2013 at 16:51
0

Unfortunately Excel 2010 and above won't save to DBF formaat any longer so I went the route of adding "SET SHAPE_ENCODING=UTF-8" to the qgis.bat file which worked fine.

I wanted to avoid installing a whole other office suite.

Editing the batch file worked great and now with qGIS the special characters carried right through to .kml and showed up in Google Earth.

Your Answer

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

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