What character encoding should I use for a web page containing mostly Arabic text?
Is utf-8 okay?
I develop mostly Arabic websites and these are the two encodings I use :
This is the most common encoding Arabic websites use. It works in most cases (90%) for Arabic users.
Here is one of the biggest Arabic web-development forums: http://traidnt.net/vb/. You can see that they are using this encoding.
The problem with this encoding is that if you are developing a website for international use, this encoding won't work with every user and they will see gibberish instead of the content.
This encoding solves the previous problem and also works in urls. I mean if you want to have Arabic words in the your url, you need them to be in utf-8 or it won't work.
The downside of this encoding is that if you are going to save Arabic content to a database (e.g. MySql) using this encoding (so the database will also be encoded with utf-8) its size is going to be double what it would have been if it were encoded with windows-1256 (so the database will be encoded with latin-1).
I suggest going with utf-8 if you can afford the size increase.