unicode in pre-beta

Tuviah M Snyder diskot123 at juno.com
Tue Feb 4 19:23:01 EST 2003


>You can now type and edit Japanese OK in a 
>single field, which is nice, but you cannot seem to move anything from 
>one field to another via script without it messing up (although 
>copy/paste works OK). 
Try

set the unicodetext of fld 2 to the unicodetext of fld 1

or to preserve styles

set the htmltext of fld 2 to the htmltext of fld 1

Of course you can set the textfont of the second field to a unicode font,
and it should just work. Whether text displays in unicode depends on it's
textfont. I recall HC actually saved the textfont information in a
variable, which led to sluggish performance, but may have been why it
worked there.

> Moreover, if you want to delete or move a single 
>Jpnese 2 byte character, you must still treat it as two characters (eg. 
>delete character 1 to 2 of field 1 deletes just the first Jpnese 
>character).
Well if the field is all unicode, you can assume that every character is
2 bytes. It actually simplifies a lot of chunk operations, and is cross
platform. Because the engine supports binary data, and because text in a
field may be unicode or non unicode we decided to stay with referencing
text in a field by byte, rather than character. I mean suppose you move
the text from a field to a custom property, and then into a variable,
should it retain the textfont of the field it was originally from?

Tuviah Snyder <tuviah at runrev.com> <http://www.runrev.com/>
Runtime Revolution Limited - The Solution for Software Development



More information about the use-livecode mailing list