[Issue 2842] New: std.file.listdir on OSX produces invalid UTF-8 sequence

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 16 08:42:43 PDT 2009


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

           Summary: std.file.listdir on OSX produces invalid UTF-8 sequence
           Product: D
           Version: 1.043
          Platform: PC
        OS/Version: Mac OS X
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: af at liquidstate.eu


std.file.listdir throws an "invalid UTF-8 sequence" exception.
please see the source file and the produced output below.

thanks.

------------------------------
import std.stdio, std.file;

int main(char[][] args)
{
        foreach (file; listdir("."))
                writefln("%s", file);   
        return 0;
}
------------------------------
blah:misc user$ dmd listdir.d
blah:misc user$ ./listdir
..

some_directory
Error: 1invalid UTF-8 sequence
blah:misc user$


-- 



More information about the Digitalmars-d-bugs mailing list