mixed languages in a field? HTMLText problems

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Jul 8 15:50:39 CDT 2005


Hi Curt,

Before struggling with unicode, you have to build right html first:
You set the htmlText of your field to a string which is not html but  
in fact usual text.
For instance, tab in html is "	" and "tab" in html is only a text  
string...
In order to understand how translation can be made between html and  
usual text, you might be interested by downloading my Encoded Text  
Picker free plugin from my web-site (address below).
It will allow you to translate any text from and to html  
automatically and then understand how to build your code properly :-)
Take heart!

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

Le 8 juil. 05 à 22:35, Curtis Ford a écrit :

> As a newbie I'm getting gray hairs trying to build a scrolling text  
> field that will display both English and Russian. (The code already  
> works well for English & other languages in the Latin alphabet,  
> including accents, umlauts, etc.). Simplifying a little, I have:
>
> repeat with i = 1 to gHowManyItems
>
>     [some code to get the first item]
>     put [first item] after gWordList
>     [more code for 2nd item]
>     put tab & [2nd item] after gWordList
>     [some code to get the 3rd item]
>     put return & [3rd item] after gWordList
>     [some code to get the 4th item]
>     put tab & [4th item] after gWordList
>
> end repeat
>
> set the HTMLText of field "list field" to gWordList
>
>
> When the first item is in Russian it shows up fine, but the  
> following English word displays as Chinese characters.
>
> When experimenting, I tried adding
>   put "test some English at beginning" && return before gWordList
>   put return & "test some English at end" after gWordList
>
> ..after building the list but before setting the HTMLText of the  
> field.
>
> The English text added before gWordList displayed fine; the Russian  
> elements in gWordList  displayed fine; but the English text added  
> after gWordList was gibberish. It seems that once an element in  
> Russian has been added, it doesn't want to go back to an encoding  
> that works with English - ?
>
> I've been able to copy mixed-language text from one field to  
> another when I'd entered the text in Revolution (using HTMLText),  
> but when I try to create something that fills fields dynamically  
> from variables, I can't get it to work right.
>
> Is there something that prevents mixing languages in a field? Am I  
> missing something obvious? Are there any sample files out there  
> that demonstrate using different languages in a field using HTMLText?
>
> Thanks for any suggestions!



More information about the use-livecode mailing list