D doesn't read the first character of a file (reads everything but the first chararacter) with either read() or readText()

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 17 20:20:21 PDT 2017


On Tuesday, 18 July 2017 at 02:21:59 UTC, Enjoys Math wrote:
>
> DMD32 D Compiler v2.074.1
>
> import std.file;
>
> void main() {
>    string bigInput = readText("input.txt");
> }
>
> The file is 7 MB of ascii text, don't know if that matters...
>
> Should I upgrade versions?

I wonder if it thinks there is a BOM and eats it?


More information about the Digitalmars-d-learn mailing list