In the ListView1 sample code, when I change the list item to some string with special characters (é, è, ç, à), they are not displayed. I have tried string.char but this does not work. Any one have a solution?
[import]uid: 6661 topic_id: 7806 reply_id: 307806[/import]
You need to make sure you’re using a font that contains special characters. Make sure you test that the device has the correct font. I can certainly confirm that French, German and Spanish characters work without any special handling. [import]uid: 3953 topic_id: 7806 reply_id: 27718[/import]
Hi,
I can’t get any special characters to work. In any kind of text object. Also string.char doesn’t work.
I’m using Corona Simulator 2011.377 on Windows XP
and I’m testing on my Android 2.2
It’s especially urgent, because my native language is German and I won’t be able to show any text because of that…
My system language is German of course. [import]uid: 49089 topic_id: 7806 reply_id: 30536[/import]
I have the same problem here. I can’t display any german characters, also using string.char does not work. I’m working on OSX 10.6 und Corona 2011.344. As an example, string.char(148) creates an empty text field instead of “ö”. And it also doesn’t with the internal system font.
Unfortunately, I’m currently working on a project where i need the german special chars and i can’t get it working (saved the main.lua as utf-8, saved it as ISO, it both didn’t work…) [import]uid: 48182 topic_id: 7806 reply_id: 32075[/import]
I was with the same problem (but portugueses characters). I’ve tried convert the charset with my editor (Komodo) and the problem persists. After a cople of googles, I’ve found this: http://blog.welrbraga.eti.br/?p=66
The “file -i” thing does not work for me, so a decided to go crazy and tried:
cp file.lua file.lua.bkp
rm file.lua
iconv -f iso8859-1 -t UTF8 file.lua.bkp \> file.lua
All my foreign characters have disapeared (actually, you can see then in vi and replace them) and, after a new type (in vi or in komodo) everything worked fine.
Hope it helps! [import]uid: 50425 topic_id: 7806 reply_id: 32285[/import]
I had similar problems discussed here …
https://developer.anscamobile.com/forum/2011/04/05/foreign-letter-support
Although I could display foreign characters OK (in Helvetica font), string handling doesn’t work as it appears that Lua encodes the characters in multiple bytes.
I believe this may be a Lua issue/feature rather than a Corona bug (if you Google for Lua UTF-8 you’ll find some relevant information). [import]uid: 2646 topic_id: 7806 reply_id: 32304[/import]
Thank you very much everybody!
Using UTF8 without BOM and using Helvetica as font works for me.
[import]uid: 49089 topic_id: 7806 reply_id: 32314[/import]
GREAT! It works! Thanks a million, you’ve saved my project!!! [import]uid: 48182 topic_id: 7806 reply_id: 32315[/import]
@nthier: What is BOM? I’m using a custom font (loaded in build.settings) and it is working fine! [import]uid: 50425 topic_id: 7806 reply_id: 32325[/import]
I can set “UTF8 without BOM” in Notepad++ in Windows. If I just use UTF8 it doesn’t work…
http://en.wikipedia.org/wiki/Byte_order_mark
[import]uid: 49089 topic_id: 7806 reply_id: 32329[/import]