Saturday, 10 February 2018

How to make a vector layer with Hebrew caption in Qgis?


I am working in Qgis and need to make layers with Hebrew caption. When I make a new layer and write a word in Hebrew, in this case on a point vector layer that I made, it looks just fine. enter image description here However, when I save the layer the Hebrew word is replaced with question marks in the Attribute table and in the caption on the map. enter image description here I tried to change the Unicode control character into right-to-left, but it did not solve the problem. enter image description here


Can anyone help me with this issue?



Answer



I'm guessing you created a shapefile layer. You have to choose a good "file encoding" already at creation time, in the same dialog.


Using QGIS 2.18, I created a new layer and chose the UTF-8 encoding (ISO 8859-8 or Windows-1255 should be fine too). Then I added a text field to it and copy/pasted some Hebrew into them from the internet. Editing the layer properties to show the labels worked as expected and everything was drawn. Saved and restarted QGIS and everything still worked.



So like I said, I suspect you didn't choose a good encoding when creating the layer. Shapefiles don't support unicode by default.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...