a little unicode help

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Oct 30 10:42:24 CDT 2012


Hi Chris,

Just consider all text as unicode. 

I'm not sure that it is possible to display different types of unicode (Japanese, Hebrew, English, Russian, Thai) next to each other in one field. This used to be impossible, but I hope this was changed in the latest version of LC.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour spaces. http://www.color-converter.com



On 30 okt 2012, at 16:36, Chris Sheffield wrote:

> I know several of you out there are unicode "experts". I'm in need of a little help with something.
> 
> Working on an iPad app. At one point I'm using a native input text field to get the user's name. Until yesterday I was simply retrieving the text property of the field and all was working well. But we have a tester who is Russian speaking, and yesterday I received a report from him that when using his Russian keyboard on the iPad, the app was crashing at the point that it retrieves the text from the field. This is probably some kind of bug, as the app should not crash like this, but I'll deal with that later since I think I've found the workaround. I discovered that I could use the unicodeText property of the field instead and avoid the crash, and it would retrieve the Russian characters without a problem. However, when I want back to test using the English keyboard again, I end up with garbled text, of course. I've tried using various combinations of uniDecode and uniEncode, but nothing seems to work correctly. I either end up with garbled English characters, or garbled Russian (or any other language that uses unicode characters for that matter).
> 
> So what it boils down to is this. Is there any way to detect if a string of characters contains unicode characters? If I could detect unicode vs. non-unicode, I think I could make this work like I want. Or maybe there's a better way? I just need something that will not crash, and that will correctly retrieve the text that's entered into the field. This user name gets saved to a sqlite database, btw. I'm not sure if anything needs to be taken into consideration for that or not.
> 
> Any takers?
> 
> Thanks,
> Chris
> 




More information about the use-livecode mailing list