Unicode: baby steps

Graham Samuel livfoss at mac.com
Wed Aug 27 13:17:37 EDT 2014


Having forgotten all I ever knew about Unicode (it wasn't much), I am trying to understand Unicode in LC, and although I have heard about "just works" I am not sure how to proceed. For example, the code for pi (Greek letter, lower case) is apparently (via internet sources)

U+03C0

it also seems to be encoded as 960, but that's in HTML.

Suppose I want to display pi in a field, "glyphPi". What does the script look like? I've tried:

set the unicodeText of fld "glyphPi" to "03C0"

and:

set the unicodeText of fld "glyphPi" to "#03C0;"

and:

set the unicodeText of fld "glyphPi" to "U+03C0"

oddly enough, all these appear to be legal, and all produce glyphs (some look like Kanji), but none of them are the symbol pi. Is this just a syntactical problem, or have I misunderstood the whole process?

And when I do get it right, can I copy this field to the clipboard and paste it into another field which will then be visible to a user in the same form? Early experiments suggest I can't, but it could just be the usual finger trouble.

TIA for any clarification

Graham



More information about the use-livecode mailing list