On 10/30/2012 05:36 PM, 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,
Honestly not sure why this is important; after all the Unicode character
set contains within it the
old ASCII set; so forget worrying about that difference; after all the
whole point about Unicode is that
it (should) encompass everything.
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
--
Chris Sheffield
Read Naturally, Inc.
www.readnaturally.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode