massung at gmail.com
Fri Feb 12 09:21:20 CST 2010
Thank you both for the thoughts and the link. NativeSpeak looks nice.
Currently, while localizing the interface of my app is something I will have
the distinct pleasure of looking forward to </sarcasm>, my interest is
mostly on displaying unicode (or non-ANSI) characters in a field that are
read from the internet.
Let me run through a sample of what I'm talking about to explain why I'm so
perplexed and maybe someone can point out what's wrong.
1. Create a new stack.
2. Create 3 fields: src, dst, and rep
3. Create a button to perform the test
5. Go to www.google.ru and copy some Cyrillic text from the upper-left
6. Paste the text into field "src"
At this point it should be noted that the text does - in fact - display the
correct Russian characters. I haven't changed the font of the field or done
anything else special as setup for the field to receive unicode characters.
This is good.
Next, I'll modify the button script like so:
put the unicodeText of fld "src" into fld "dst"
set the unicodeText of fld "rep" to fld "dst"
What I expect to happen is field "dst" should now contain all the bytes that
comprise the unicode string and rep should be a copy of the original source
text. But that isn't what happens. Hell, even just doing a "copy" of src ->
rep doesn't even work:
set the unicodeText of fld "rep" to the unicodeText of fld "src" ## or...
put fld "src" into fld "rep"
I don't mind writing a lot of functions to handle manipulation of unicode
strings at the byte level. But if I can't even get unicode characters from
one field to appear in another, I might as well be throwing darts at a
bullseye on the floor blindfolded; I'll just end up with bloody feet and a
If anyone can suggest how I can end up getting the above example to work,
I'm all ears... and feet. ;-)
More information about the use-livecode