htmltext to unicode

Devin Asay devin_asay at byu.edu
Fri Jan 15 19:28:25 EST 2010


Oops. The hazards of non-linear editing. That last bit should read:

On Jan 15, 2010, at 4:53 PM, Kee Nethery wrote:

> -- horrific thought --
> Am I going to have to manually convert these HTML entities into  
> UFT16 using the numtochar function for each set?

It's not as terrible as you fear. You have to make a couple of
educated guesses about the language, but just do this:

Paste your unicode entities into a field, say, "code" and surround
them with html tags:

<font face="Osaka"
lang="ja">セキュリティー
個人情報
代金返却方針
ヘルプ</font>

Then make another field "final" and do this:

set the htmltext of fld "final" to fld "code"

If they don't look quite right, try different fonts in the face
attribute or other languages in the lang attribute. For example,
Chinese Simplified is "zh-CN" and Traditional is "zh-TW". Google html
language codes if you need to try others.

Now you have real unicode text and you can save it or do whatever you
need by referring to the unicodeText of fld "final".

HTH,

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list