html-texting Unicode text

Ron rbarber at yhb.att.ne.jp
Wed Jun 4 20:37:01 EDT 2003


Hi all

I am attempting to add formatting to text before displaying it in the fld,
specifically, coloring a foundword throughout the text. This is
straightforward when dealing with ascii text - something like:

replace "foundword" with "<font color=red>foundword</font>" in thetext
set the htmltext of fld 1 to thetext

This is no problem and I use this technique for lots of other formatting
needs as well. 

My difficulty is in adding formatting to unicodetext. I start with Japanese
text that needs to be converted using the uniencode function. The result is
unicodetext but I can't seem to add htmlformatting to the variable and have
it stick. Setting the fld to the unicodetext loses the htmlformatting and
setting it to the htmltext results in no visible text at all. I have tried
all manner of combinations of setting html first, setting unicodetext first,
setting the fld and getting the texts etc. but haven't hit upon the right
combination.

How can I add html formatting codes to a unicodetext variable?

Thanks
Ron




More information about the use-livecode mailing list