AW: AW: Don't understand unicode handling

Tiemo Hollmann TB toolbook at
Mon May 23 03:08:13 EDT 2016

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

-----Ursprüngliche Nachricht-----
Von: use-livecode [mailto:use-livecode-bounces at] Im Auftrag
von J. Landman Gay
Gesendet: Freitag, 20. Mai 2016 20:05
An: How to use LiveCode <use-livecode at>
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.

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription

More information about the Use-livecode mailing list