AW: Don't understand unicode handling
Tiemo Hollmann TB
toolbook at kestner.de
Fri May 20 13:53:05 EDT 2016
thank you for the helpful link, with your help, I found the right
conversion, though I don't understand what is going on :)
For my issue the solution was not to use uniEncode() when importing the file
into LC, but just putting the file into a field.
But using uniDecode() when exporting it from LC.
I think my problem is that you don't see what type of coding a file has. If
you have to handle with unknown data, you just have to try the different
combinations of encode/decode/do nothing with the data, because a file has
no label "I am UTF-8".
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag
von Thierry Douez
Gesendet: Freitag, 20. Mai 2016 19:07
An: How to use LiveCode <use-livecode at lists.runrev.com>
Betreff: Re: Don't understand unicode handling
To import text from a UTF-8 file and display it in our stack we just need to
read it in, uniEncode() it and then display it as we learnt earlier.
*put* url ("file:greek.txt") into tUnicodeText
*set* the unicodeText of field 1 to uniEncode(tUnicodeText,"UTF8")
If we want to export text from our stack we simply go in the other direction
*put* uniDecode(the unicodeText of field 1,"UTF8") into tUTF8Text
*put* tUTF8Text into url("file:greek2.txt")
Guess it's what you need....
Thierry Douez - http://sunny-tdz.com
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the Use-livecode