[Issue 9750] byLine(KeepTerminator.no) problem with Windows newlines in binary mode files

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 18 11:57:21 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9750


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-03-18 11:57:20 PDT ---
(In reply to comment #0)
> import std.stdio;
> void main() {
>     File("words.txt")
>     .byLine(KeepTerminator.no)
>     .writeln;
> }

I think std.stdio is badly designed w.r.t. newlines. A terminator can be set
(in the call to byLine), however it can only be a character instead of a
string. So '\n' or '\r' is fine, but you can't set "\r\n".

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list