Read text file in LCB

Moderators: LCMark, LCfraser

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1545
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Read text file in LCB

Post by [-hh] » Fri Oct 07, 2016 9:44 pm

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
shiftLock happens

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: Read text file in LCB

Post by peter-b » Fri Oct 07, 2016 11:19 pm

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
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

Post Reply

Return to “LiveCode Builder”