unicodeasciifarsi

How to write numbers in other language in web?


My website has two language, English and Persian. When I use Persian language and I write some number, the number shows in English language

For example when I write 67 in Persian unfortunately it show me 67 in English but I write it in Persian (My font is Arial) : enter image description here

How to write numbers in Persian?


Solution

  • Persian numbers have different unicode codes, f.e english zero 0 is code 48 (0x0030 hex), but persian zero 0 is code U + 06F0, so you have to enter numbers in proper unicode codes (different chars). Also your font have to support these codes (not all fonts support such numbers).

    Persian numbers starts at unicode 0x06F0 (0, ۰) to 0x06F9 (9, ۹) while english numbers are 0x0030 (0) to 0x0039 (9).

    How to enter these characters (in Windows)

    If you do not have proper language support to enter these characters on your keyboard, you can enter them in Wordpad (standard application in Windows) or in Microsoft Word by entering four characters (hexa) of the code (f.e. 06F9) and pressing alt+x shortcut. four-character word will be converted to proper unicode character.