On Monday, 1 January 2018 at 12:33:27 UTC, John Chapman wrote:
On Sunday, 31 December 2017 at 18:21:29 UTC, Domain wrote:
In Windows, exists, rename, copy will report file not exists
when you input non-English filename, such as Chinese 中文.txt
Works for me. I created a file with the name "中文.txt" and
std.file.exists returned true.
Is your D source file saved in ASCII by any chance? Try saving
it with a different encoding, such as UTF8.
Yes, "中文.txt".exists return true. But when then filename read
from stdin,
it return false
stdin
.byLineCopy(No.keepTerminator)
.each!((a) { writefln("%s --> %s", a, a.exists); });
dir *.txt /b | test.exe
English.txt --> true
中文.txt --> false