View Full Version : Displaying arabic/farsi in alert box

01-04-2005, 07:14 PM
Many thanks for taking the time to read this, I hope the terminology makes sense.

I am currently developing a website with one of the requirements that the same site must be portable into more than one language. The main two languages are english and farsi (arabic character set).

Farsi reads right to left, english left to right.

Everything is working fine with crossing over from one language to another - a swift change of character set and a subtle right to left css niftyness for displaying everything - all very funky however when i come to pop up a javascript alert box the farsi is displayed only as question marks. e.g. ????? ??? ???????

I have not been able to find an english version on the web an example of popping up a javascript alert box dsiplaying farsi/arabic reading right to left - probably because my farsi is so bad and all the documentation is in that language!

I have already written a little snippet than translates farsi characters into ansi codes, however alerting these just treats the ansi code as a string and displays it as such in raw format.

Could anyone either answer my query on how to do this, or point me towards a resource (in english) that would help.

Many thanks for your time.


01-06-2005, 06:27 AM
This might give you an idea.


01-06-2005, 11:00 AM
Many thanks for your time and advice - perfect!