[Issue 11431] New: std.file.slurp with Windows newlines
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 3 08:35:58 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11431
Summary: std.file.slurp with Windows newlines
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-11-03 08:35:57 PST ---
If I create a simple "data.txt" file containing this, with Windows newlines:
10
20
30
And I try to read it with slurp:
import std.file: slurp;
void main() {
slurp!(int)("data.txt", "%d");
}
I get a stack trace:
object.Exception at ...\dmd2\src\phobos\std\file.d(2992): Trailing characters at
the end of line: `
'
---------
0x00413C36 in pure @safe void std.exception.bailOut(immutable(char)[], uint,
const(char[]))
...
--
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