Page 1 of 1

Direct LCB encoding/decoding

Posted: Thu Oct 05, 2017 3:31 pm
by [-hh]
Instead of doing that by LCS and get it back I'm trying to encode/decode data in LCB.

Code: Select all

use com.livecode.encoding
doesn't work, the module is not available.
Trying to use (part of) the source of encoding.lcb on github doesn't work:

Code: Select all

use com.livecode.foreign
foreign handler ExecEncodeUsingBase64(in pSrc as Data, out rVal as String) \ 
returns nothing binds to "<builtin>"
compiles but results in an LCB error "Unable to bind foreign handler ..."

Trying to use "unsafe"-context also doesn't help.
What's wrong? What can I do?

Re: Direct LCB encoding/decoding

Posted: Fri Oct 06, 2017 2:18 pm
by livecodeali
Unfortunately there isn't currently a way - the encoding module was left uncompleted pending decisions about string encoding functions I believe... anyway, I've filed a bug because we should be able to get (at least) base 64 encode / decode in there.

http://quality.livecode.com/show_bug.cgi?id=20521