https://d.puremagic.com/issues/show_bug.cgi?id=12493

           Summary: std.file.readText doesn't convert Windows newlines
                    correctly
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2014-03-30 07:16:32 PDT ---
If I create a text file named "text.txt" like this, that contains four lines,
and I save it with Windows newlines:


this
is
a
test




Then if I read and print the whole file like this:

void main() {
    import std.stdio: writeln;
    import std.file: readText;
    auto t = readText("text.txt");
    writeln(t);
}


Output:

this

is

a

test


Expected output:

this
is
a
test

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

Reply via email to