https://issues.dlang.org/show_bug.cgi?id=5378

Răzvan Ștefănescu <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |[email protected]
         Resolution|FIXED                       |---

--- Comment #8 from Răzvan Ștefănescu <[email protected]> ---
Default behaviour is unexpected, at least on Windows where most files contain
lines ended in \r\n.

Use of lineSeparator enum for cross platform development does not guarantee
that the file you are processing contain only the lineSeparator terminator.

If I ask byLine, I expect to obtain a line not something else, not a line ended
with another line terminator. What if my file contains some lines ended in \r
and other line ended in \r\n?

Default behaviour must strip terminators and must consume all known line
separators, there is no point to discriminate between them:
- 0x0d
- 0x0d\0x0a
- 0x0a
- Unicode categories Zl, Zp.

--

Reply via email to