lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.