AW: Don't understand unicode handling
J. Landman Gay
jacque at hyperactivesw.com
Fri May 20 14:04:57 EDT 2016
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:
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 hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode