Unicode frustration

Brad Borch brad at activadesign.com
Wed Jul 20 13:27:47 EDT 2005


Ok, I'm befuddled. I'm not quite sure how Revolution handles unicode. I 
have a field that lists all the fonts in my system. The Rev 
documentation says:

"Revolution automatically sets the textFont of double-byte characters to 
the appropriate Unicode font."

So if I set the htmltext of a field like so:

<font face="Bitstream Vera" lang="en-UC">αβγδε ελλενικα</font>

The first string of Greek characters is rendered as Greek, but the 
second is rendered as Asian characters (I don't know which). Getting the 
html text of the field after setting it to the above string yields this:

<p><font face="Bitstream Vera" 
lang="en-UC">αβγδε 딃묃묃딃봃뤃먃</font></p>

If I take out the space in the text I originally pasted, it renders the 
entities correctly:

<p><font face="Bitstream Vera" 
lang="en-UC">αβγδεελλενικα</font></p>

So there's some conversion going on inside Revolution to standardize the 
html, but it looks like there's a bug in the process somewhere.

If I type or paste in Greek unicode characters, the htmltext gets 
updated to reflect the text: paste in "αβγδε ελλενικα" and get the 
htmltext, the font tag gets updated to include "lang="el"" (doesn't 
matter what face it is, I guess it just uses whatever is the default 
Unicode font.

What's happening here? How can I force Rev to use the Unicode text I 
want it to use?




More information about the use-livecode mailing list