I have a problem with Quantum GIS and Mapinfo, in both Windows XP and Windows 7. I need to use French and Arabic. One field is called Name_fr, and the other Name_AR. The Arabic is fine until the moment I save the table, and all the characters turn into question marks.

Thank you for the help.

  • Have you had this error with previous versions of QGIS, or is it only in 1.8 that you've experienced these problems? – nagytech Aug 1 '12 at 23:19
  • I am new to qgis,so I didn't previous releases of qgis.Seems to have the same problem with Mapinfo. – Temmar Aug 2 '12 at 16:29

This issue came up with improvements to GDAL's handling of encoding. It was discussed here on the qgis maillist. There are some suggested workarounds in that dicussion. I'm sure a permananet solution will appear soon, but what I found solves the problem fro now is the suggestion by Even Rouault:

First you need to have all the text attributes in your shapefile encoded as UTF-8. THen add to the batch file that starts QGIS (usually OSGEO4W\bin\qgis.bat) one line to set an enviroment variable:


With that, you can then save text strings (in my case in hebrew, but I suppose Arabic will be the same) without it getting turned into question marks.

  • That seems to work Fine. Thank you very much for the Help. – Temmar Aug 3 '12 at 15:47
  • Good morning By any chance, is there a similar action for the mac. I don't know if there is an equivalent to qgis.bat on a mac Best regards Ahmed – user12528 Nov 6 '12 at 11:24
  • I'm not sure the problem even appeared on MacOS. What versions of QGIS and gdal are you using? – Micha Nov 7 '12 at 12:12

On Mac you can open a Terminal app and run:

$ SHAPE_ENCODING=UTF-8 /Applications/QGIS.app/Contents/MacOS/QGIS

  • Welcome to GIS Stack Exchange! I don't have the expertise to answer this question but looking at your Answer it does not seem to address the Question. If you think it is fine just leave it there but if you intended it as a Comment then perhaps copy it to one and delete this answer. – PolyGeo Jun 10 '13 at 7:03
  • @PolyGeo: I think it is a valid answer. If you look at the accepted answer, it talks of setting the encoding in Windows. This answer talks of setting the encoding on a Mac. I'm sure this question will be found by people searching on how to set the encoding on Mac, even though the OP did not ask for a Mac OS solution. – Devdatta Tengshe Jun 10 '13 at 7:22
  • @DevdattaTengshe I'll definitely defer to you on this - I'm not sure why, but I didn't see the Accepted answer when I reviewed this, and you are right that providing the Mac answer is good work that I'll reward with a +1 – PolyGeo Jun 10 '13 at 8:08
  • 1
    I think I read the comment above "Good morning By any chance, is there a similar action for the mac. I don't know if there is an equivalent to qgis.bat on a mac Best regards Ahmed – user12528 Nov 6 '12 at 11:24" and happened to respond with the thought that it might be useful to other Mac users. – Pattara Kiatisevi Jun 17 '13 at 18:10

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.