Closed
Description
There some buffering error in how windows new line characters are being handled by the readlines()
function.
Please consider the following code:
stream = open("foo.txt", "w")
write(stream, "a")
for i = 1:2^17
write(stream, "ab\r\n")
end
close(stream)
lineNo = 0
for line in readlines("foo.txt")
lineNo += 1;
if '\r' in line
println("line ",lineNo," contains \\r character")
end
end
And the output:
line 32768 contains \r character
line 65536 contains \r character
line 98304 contains \r character
line 131072 contains \r character
Seems like improper handling of the last character in the buffer.
Tested on Julia 0.6.0-rc3 and 0.7.0-DEV.636