LC 9.6.8 and UTF-8 on MacOS 10.15

jbv at jbv at
Sat Jul 9 07:43:03 EDT 2022

Hi list,

I have a serie of text files in UTF-8 format for which I need to do some 
processing in LC,
and then save to a single text file also in UTF-8.
I am using the following code :

       open file tpath for UTF8 read
       read from file tpath until EOF
       close file tpath1
       --put it into tfile
       put textdecode(it,"UTF-8") into tfile

--    processing

       open file tpath2 for UTF8 write
       write liste_credits to file tpath2
       close file tpath2

If I use "put it into tfile" instead of "put textDecode...", the text 
content is full of typical
gibberish (such as "√¶" instead of "æ").
I thought the latest LC versions could process UTF-8 natively. So why is 
"textdecode" necessary
to obtain special characters in their true form ?
Thank you in advance.


More information about the use-livecode mailing list