[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: binary string modified
- From: Martin <eden_martin_fuhrspam@...>
- Date: Sun, 21 Aug 2016 04:48:08 -0700
On 16-08-20 05:41 PM, nobody wrote:
> On 2016-08-20 23:09, Satoru Kawahara wrote:
>> Hello,
>>
>> I tried to copy luac.out into a script file as string and run the native
>> code string with `load()`.
>
> Did you use a literal/long string ([[...]])? It seems to normalize all
> line endings (0d0a / \r\n --> 0a / \n), thereby breaking it.
>
> ...
In short, lua long strings syntax is not suitable for storing binary data.
Read .out file to string directly as binary file or encode binary data
before saving it.