-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorioInvolving the I/O subsystem: libuv, read, write, etc.Involving the I/O subsystem: libuv, read, write, etc.
Milestone
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
endAnd 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorioInvolving the I/O subsystem: libuv, read, write, etc.Involving the I/O subsystem: libuv, read, write, etc.