Greetings to all!
I work on Windows with cp1251 and I have a mistake in the program:
import std.stdio;
int main (string [] args) {
string nameFile = `«Ёлки с объектами №876».txt`;
File f = File (nameFile, w);
f.writeln (Greetings!);
return 0;
}
This mistake of a kind:
According to the documentation
https://msdn.microsoft.com/de-de/library/yeby3zcb.aspx, _wfopen
already takes a wide-character string, not an ANSI string.
So
return _wfopen(name.tempCStringW(), mode.tempCStringW());
would be the correct way. All these weird ansi versions are
Windows
The decision, which I have applied using function
fromUtf8toAnsiW() already works correctly.
I use dmd 2.067.0
On 4/3/15 2:26 AM, MGW wrote:
Greetings to all!
I work on Windows with cp1251 and I have a mistake in the program:
import std.stdio;
int main (string [] args) {
string nameFile = `«Ёлки с объектами №876».txt`;
File f = File (nameFile, w);
f.writeln (Greetings!);
return 0;
}