[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Literal string strangeness
- From: Matthew Wild <mwild1@...>
- Date: Fri, 23 Oct 2009 12:21:15 +0100
2009/10/23 Dirk Feytons <firstname.lastname@example.org>:
> On Fri, Oct 23, 2009 at 12:51 PM, Mauro Iazzi <email@example.com> wrote:
>>> I would have expected a 13 in place of the second 10. Any ideas?
>>> I am using Lua 5.1.4 on linux. Thanx!
>> It is deliberate, see llex.c lines 257-263. I cannot find any mention
>> in the manual ( assuming it would be in
> It is mentioned there: "For convenience, when the opening long bracket
> is immediately followed by a newline, the newline is not included in
> the string."
No, this is different. It is to do with Lua's "handling" of CRLF line
endings I believe. I feel this is wrong in strings, especially long
strings, and have been hit by it before (fair enough, I /was/ trying
to embed binary data inside a script).