AW: AW: AW: Don't understand unicode handling

Tiemo Hollmann TB toolbook at kestner.de
Mon May 23 08:07:29 EDT 2016


Yes, that function is exactly, what I was looking for.
Fraser told to provide such a function, but I didn't see it yet.
Tiemo


-----Ursprüngliche Nachricht-----
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag
von Paul Dupuis
Gesendet: Montag, 23. Mai 2016 13:40
An: use-livecode at lists.runrev.com
Betreff: Re: AW: AW: Don't understand unicode handling

I spoke to Fraser when LC7 came out about a lack of a guessTextEncoding
function.

See http://quality.livecode.com/show_bug.cgi?id=14474



On 5/23/2016 3:08 AM, Tiemo Hollmann TB wrote:
> Hi Jacque,
> thanks for the function update.
> But if you don't know, what kind of encoding the source file is, it's 
> still trial and error, or is there any kind of "quickcheck" for the 
> current source encoding?
> Tiemo
>
> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im 
> Auftrag von J. Landman Gay
> Gesendet: Freitag, 20. Mai 2016 20:05
> An: How to use LiveCode <use-livecode at lists.runrev.com>
> Betreff: Re: AW: Don't understand unicode handling
>
> On 5/20/2016 12:53 PM, Tiemo Hollmann TB wrote:
>> Bonsoir Thierry,
>>
>> 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".
> In LC 7 and above, the old unicode syntax is deprecated and the new 
> encoding syntax is easier to use. Whenever you import or export text 
> you need to translate it using the new textEncode and textDecode
functions.
>
> To bring unicode text into LC:
>
>    get textDecode(<filepath>,"UTF8")
>
> and to export it:
>
>    put textEncode(tText,"UTF8") into file <filepath>
>
> If you are not sure what the unicode encoding is, it is almost always 
> safe to assume UTF-8. The dictionary has examples.
>


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list