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.