I have data in GeoJSON that contains Arabic in some attribute when reading the attribute


I get this:

enter image description here Unreadable how to enable UTF8 or I don't know...

  • In openlayers GIS – Rabie Ben Sep 19 '15 at 14:28

I was getting data from GeoJSON file ,and it was a problem of encoding characters in it at first place. I specified "utf-8" in the creation of my GeoJSON file ,and it worked well, thank you. enter image description here


OpenLayers 2 does not have any problems with arabic characters, see e.g. this fiddle.

However, you will need to specify the correct character encoding in your HTML file, something like:

    <meta charset="utf-8">

Also make sure your files are indeed in UTF-8 encoding, of course.

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.