Put URL into variable and textEncoding

Richard Gaskin ambassador at fourthworld.com
Mon Feb 12 19:56:04 EST 2018

Given the nearly-universal use of UTF-8, it would seem ideal for a 
language focusing on ease of use if that could be made a default.

I can understand why we can't use "open tFile for text..." given the 
legacy, but maybe something like "open tFile for modernText..." or 
something more sensible.

  Richard Gaskin
  Fourth World Systems

Kay C Lan wrote:
> 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