[Issue 15293] File().byLine().map!toUpper throws UnicodeException at src\rt\util\utf.d(290): invalid UTF-8 sequence on pure ASCII file

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Nov 5 14:57:08 PST 2015


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

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com
           Severity|normal                      |regression

--- Comment #2 from ag0aep6g at gmail.com ---
A first reduction:
----
static import std.file;
import std.stdio: File;
import std.string: toUpper;

void main()
{
    std.file.write("gentest.txt", "aaaaaaaa\naaaaaaa\n00000000a");
    foreach(ln; File("gentest.txt").byLine())
    {
        toUpper(ln);
    }
}
----

Works with 2.068.2.

--


More information about the Digitalmars-d-bugs mailing list