Re: std.file and non-English filename in Windows

2018-01-01 Thread tipdbmp via Digitalmars-d-learn
I think you have to decode your input to UTF-8. stdin .byLineCopy(No.keepTerminator) .each!((string file_name_raw) { // change Latin1String to the code page of your console; // use the 'chcp' command to see the current code page of your console // import std.encoding; auto

Re: std.file and non-English filename in Windows

2018-01-01 Thread Domain via Digitalmars-d-learn
On Monday, 1 January 2018 at 16:13:06 UTC, Domain wrote: 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 中文

Re: std.file and non-English filename in Windows

2018-01-01 Thread Domain via Digitalmars-d-learn
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 "中文.tx

Re: std.file and non-English filename in Windows

2018-01-01 Thread John Chapman via Digitalmars-d-learn
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 s

Re: std.file and non-English filename in Windows

2018-01-01 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, January 01, 2018 10:47:51 Patrick Schluter via Digitalmars-d- learn 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 > > It's unclear what y

Re: std.file and non-English filename in Windows

2018-01-01 Thread Patrick Schluter via Digitalmars-d-learn
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 It's unclear what your problem is but here a wild guess. Windows API's for Unicode use UTF-16 as far as I know. St

std.file and non-English filename in Windows

2017-12-31 Thread Domain via Digitalmars-d-learn
In Windows, exists, rename, copy will report file not exists when you input non-English filename, such as Chinese 中文.txt