On Sat, 31 Jul 2010 21:15:21 -0400, bearophile <[email protected]>
wrote:
I think there is a bug here, but can you please try it a bit?
The name of this program is "test.d", so it loads its souce code:
import std.file: readText;
import std.stdio: write;
void main() {
string s = readText("test.d");
write(s);
}
On windows the output is:
import std.file: readText;
import std.stdio: write;
void main() {
string s = readText("test.d");
write(s);
}
So it shows extra newlines (on Windows newlines are two chars).
On Windows a similar Python program doesn't show the doubled newlines:
s = open("test.d").read()
print s
Copy-pasting the source from an editor to the newsgroup window may not
allow others to see the problem, since it may have to do with non-visible
characters.
Attach the file directly to a news post, then maybe we can repeat it
easier.
-Steve