Page 1 of 1

Read text file in LCB

Posted: Fri Oct 07, 2016 9:44 pm
by [-hh]
Is there a way to read in a simple UTF8 text file to a string in LCB?

I found only this way to read and write the _raw data_ of a file, usable for binary data/ image data.

Code: Select all

variable tvalidFilePath as String
get/set the contents of file validFilePath
Thanks

Hermann

Re: Read text file in LCB

Posted: Fri Oct 07, 2016 11:19 pm
by peter-b
Work on text encoding/decoding for LCB has been stalled since February 2015: https://github.com/livecode/livecode/pull/1754

In my personal projects I'm currently bind the MCStringEncode/MCStringDecode C++ functions directly: https://github.com/peter-b/undergrowth/ ... il.lcb#L24