Unicode Chinese Mac

Dar Scott dsc at swcp.com
Tue May 10 14:53:24 CDT 2005


On May 10, 2005, at 12:53 PM, Thomas McGrath III wrote:

> I feel like I am reading a foreign language (grin) dealing with 
> unicode. I would like to know what Unicode does work with. line, item, 
> word, foundchunk, filter, find, etc.

'a & b' works if both a and b are unicode.

'char 2n-1 to 2n of s' will get the nth unicode char.

numToChar and charToNum work.

uniDecode() & uniEncode() work.

And 'the unicodeText' usually works.

You can use replaceText(), matchText() and matchChunk() if you write 
awfully contorted regex and then that requires prayer and fasting.

You can use unicode in an element of an array, but not in a key.

You can pass Unicode to a function or command and return Unicode.

You can 'get' and 'put into/after/before'.

You can read and write files as binary and they should usually be UTF8 
or UTF16 with BOM at the front.

If you know you have no suragates, then length(s)/2 will give you the 
number of Unicode characters in s.

That's about it for what works.

You can't use =, is a number, contains, line, item, foundchunk, filter 
(except for a trick), find, +, -, /, *, add, subtract, offset (except 
with extra scripting), and just about anything.

You can't save Unicode in a custom property on one OS and expect it to 
work on another.

You need to write helper functions for all these things.

Dar


-- 
**********************************************
     DSC (Dar Scott Consulting & Dar's Lab)
     http://www.swcp.com/dsc/
     Programming and software
**********************************************



More information about the use-livecode mailing list