Jon,
Thanks Man for your help , it works using the following
[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
ToArabicNum=numbersToArabic(“0123456789”)
local test = display.newText(ToArabicNum, 0, 0, native.systemFont, 55)
[/lua]
I have one question just to understand the concept for the conversion. What is the difference between the coding we used from the website you provided (http://www.cafewebmaster.com/online_tools/utf8_encode ) and the one I found (http://www.utf8-chartable.de/unicode-utf8-table.pl).
in your website number 1 in arabic is encoding as “Ù¡” whereas in the second website it is encoded as “U+0661” see the picture below for arabic encoding , when i used these encodes with functions you prvoided it didnt work…