[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: End-of-line characters in long strings
- From: Hisham <hisham.hm@...>
- Date: Thu, 17 Jan 2008 20:32:36 -0200
Apparently, on Linux and OSX at least, "\r" characters are cut off the
ends of lines when Lua loads .lua sources, including inside long
strings. This file contains an example:
(I didn't send the file in the email to avoid the risk of mailers
processing end-of-line characters themselves and ruining the test
case. Open the file in an editor that shows non-printable characters,
such as vim -- \r will appear as ^M.)
The results I get when running that are:
I'd expect the second and fourth lines to return 13, but they don't.
Is this a bug or am I doing something wrong?