mixed languages in a field? HTMLText problems
Curtis Ford
cford at sc.edu
Fri Jul 8 16:35:32 EDT 2005
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!
-Curt
Dr. Curtis Ford
Instructor of Russian and Linguistics
Dept. of Language, Literatures and Cultures
University of South Carolina
cford @ sc.edu
More information about the use-livecode
mailing list