Handling Thai characters...
Posted: Wed Oct 09, 2013 10:00 am
Hi ... I'm trying, and failing, to display Thai characters in an app, and would much appreciate some guidance.
First I went to Google Translate so that I could create some Thai text. This I pasted into Wordpad and saved as "Unicode Text Document".
That seems to have worked because I can open the same document in OpenOffice Writer and I see the correct text. I did this in WindozeXP. If I open the file with TextEdit on a Mac, it also looks correct.
Then I tried to read that text into LC. My code looks like this:
What I see is a jumble of line drawing characters, musical notes, plus a few numbers. If I run the same app on a Mac, I see a string that looks like "5 L P 7"...etc.
Did I miss a step?
Many tkx...
--paul
First I went to Google Translate so that I could create some Thai text. This I pasted into Wordpad and saved as "Unicode Text Document".
That seems to have worked because I can open the same document in OpenOffice Writer and I see the correct text. I did this in WindozeXP. If I open the file with TextEdit on a Mac, it also looks correct.
Then I tried to read that text into LC. My code looks like this:
Code: Select all
put "binfile:" & specialFolderpath("documents") & "/thai.txt" into tThai
put url tThai into tThaiText
set the unicodetext of fld "somefield" to uniencode(tThaiText,"UTF8")
Did I miss a step?
Many tkx...
--paul