Hi, following application creates a text file with strange content:
void writeTextFile(string filePath, string text)
{
import std.stdio: File;
auto f = File(filePath, "w");
f.write(text);
f.close();
}
void main()
{
import std.ascii: newline;
string s = "a=1"~newline~"b=2";
writeTextFile("./test.txt", s);
}
Notepad++ detects the file as macintosh UTF8 file.
The file has following content:
a=1CR
CRLF
b=2
Where the first CR comes from? Is this a bug?
dmd v2.071.2 on win10
Kind regards
André
