persistent Unicode problems
Jan Schenkel
janschenkel at yahoo.com
Fri May 30 01:08:06 EDT 2003
--- Toma Tasovac <ttasovac at Princeton.EDU> wrote:
> Dear Jan,
>
> many thanks for your email and your help. Here's
> what happens:
>
> put uniencode (url "file:translations.txt","utf8")
> into tTranslations
> split tTranslations with cr and tab
> answer the keys of tTranslations
>
> -- this gives me the same empty boxes and numbers
> instead of Cyrillic
> words. What does this mean?
>
> And yes, I am storing the array this way:
>
> set the customProperties[cTranslations] of this
> stack to tTranslations
>
> I've spent a lot of time looking at my code, and I
> really can't find
> anything wrong with it.
>
> All best,
> Toma
>
Hi Toma,
Do you mind my asking what the file strucutre is ? My
best guess at this point :
<foreign_language_word><tab><english_translation>
It might be a better tactic (especially if you're
going multi-platform in the future), to _not_ store
this in a uniEncoded form.
So just split the file contents without encoding, and
store in the custom properties. Worry about display
afterwards -- plenty of time to encode again.
What does clickText return ? The uniEncoded data (n *
2 characters) ? In that case you could just hunt down
the correct translation by unidecoding it :
put uniDecode(the clickText) into tClickedWord
set the text of fld "translationDisplay" to \
the cTranslations[tClickedWord]
Apart from this, I've run out of ideas ; though if you
send me a small sample stack off-list, I'd be happy to
sink my fangs in it.
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
More information about the use-livecode
mailing list