Put URL into variable and textEncoding

Kay C Lan lan.kc.macmail at gmail.com
Mon Feb 12 19:11:55 EST 2018


No, nothing has changed. The Dictionary entry for textEncode and
textDecode still contains this note:

It is highly recommended that any time you interface with things
outside LiveCode (files, network sockets, processes, etc) that you
explicitly textEncode any text you send outside LiveCode and
textDecode all text received into LiveCode. If this doesnt happen, a
platform-dependent encoding will be used (which normally does not
support Unicode text).

Of course, the URL you use today might work fine without textDecode,
but another URL and another day you might not be so lucky.

put textDecode(URL "http://www.some/service/endpoint","UTF8") into tVariable

is still only a single line of code and I very much doubt that you
will notice the extra cpu cycles.




More information about the use-livecode mailing list