problem when trying to display the number zero in Arabic.

Hi, 

I’m trying to display numbers in arabic.

everything is going well except the number zero “0”.

I’m using this function :

[lua]local function numbersToArabic(numberString)

local numberString = tostring(numberString)
local replacements = {[“0”] = “Ù”,[“1”] = “Ù¡”, [“2”] = “Ù¢”, [“3”] = “Ù£”,[“4”] = “Ù¤”,[“5”] = “Ù¥”,[“6”] = “Ù¦”,[“7”] = “Ù§”,[“8”] = “Ù¨”,[“9”] = “Ù©”}
return utf8_decode(string.gsub (numberString, “%d”, function (str) return replacements [str] or str end))

end[/lua]

I’m stuck with this issue and can’t complete writing my app.

how can I fix this ?!

additional information :

1-on windows machine it’s displayed as question mark inside a diamond.

2-on mac, it’s not displayed at all.

thanks.

I searched and I found an old topic talking about displaying Arabic numbers on Corona, I found that the person posted a picture and the number “0” displayed correctly << the same replacement function I used.

but I can’t get it to be displayed correctly. can someone please try in their machine please ?

I searched and I found an old topic talking about displaying Arabic numbers on Corona, I found that the person posted a picture and the number “0” displayed correctly << the same replacement function I used.

but I can’t get it to be displayed correctly. can someone please try in their machine please ?