I'm not sure, but I think this would fail under Windows. IIRC, lines are separated with the platform eol, while here it uses the one used on the platform when writing this code.