doublebyte chars
Lars Brehmer
larsbrehmer at mac.com
Sun Jun 12 11:03:13 EDT 2011
Thanks for the suggestions, but I am still completely baffled. (I noticed that Russian text didn't display in the newsletter)
I looked and Devin's tutorial and experimented a little bit.
Two fields, both "arial,russian"
In the first (fld "q1") I typed in Russian "menya zovut" (I am called, or they call me)
In the second (fld "q2") I typed in Russian "zovut menya" - the same two words in reverse order.
set the useUnicode to true
put chartonum(char 1 to 2 in fld "q1") - returns 1084
set the useUnicode to true
put chartonum(char 1 to 2 in fld "q1") - returns 1079
So far so good. However, I repeated this with the first letter in the second word in each field. Shouldn't I get the same results? It is the same letters/chars after all.
set the useUnicode to true
put chartonum(char 1 to 2 in word 2 in fld "q2") - returns 15360 !!!!!
set the useUnicode to true
put chartonum(char 1 to 2 in word 2 in fld "q1") - returns 14080 !!!
These are the same characters! I repeated it with itemDel = space, and char 1 to 2 item 1/2 and got the same result. Does unicode somehow handle words/items differently? I am very confused.
Cheers,
Lars
More information about the use-livecode
mailing list