I’m not sure whether this is a Corona bug or to do with the way Lua handles foreign character sets.
For example if I use the following code, the Spanish word “ratón” is displayed correctly …
local word = display.newText("", 0, 0, "Helvetica", 100)
spanishWord = "ratón"
word:setTextColor(0, 0, 255)
word.text = spanishWord
word.x = display.contentWidth/2
word.y = display.contentHeight/2
However, if I try this …
local wordSound = audio.loadSound("ratón.mp3")
audio.play(wordSound, {channel = 1})
… I get a resource not found error (but you can play the file ratón.mp3 in Quicktime OK, so it’s a valid OSX filename but what about iOS?).
The reason it may be a Lua issue is that if I do any string manipulation on “ratón” I run into problems. For example, Lua returns a string length of 7 character with the following byte codes (114, 97, 116, 111, 204, 129, 110). So the letter ó is represented by 3 bytes (111, 204, 129).
So is this a bug in Corona or a peculiarity of Lua? Either way is there a work around? [import]uid: 2646 topic_id: 8581 reply_id: 308581[/import]