[Issue 8730] writeln stops on a nul character, even if passed a D string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 15 10:25:41 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=8730
monarchdodra at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |monarchdodra at gmail.com
--- Comment #7 from monarchdodra at gmail.com 2013-12-15 10:25:36 PST ---
Has anybody done anything to fix this? If not, then IMO, it's simply invalid.
I think this is "just" an OS output issue: When printing a null character to
console, the console seizes to print for the current line.
For example, on windows,
writeln("test\0gone");
prints
test
Yet
writeln("test\0gone\n");
prints
test gone
and
writeln("test\0gon", 'e');
prints
test gone
Weird, right?
So I decided to simply print to file, and check what is actually being *passed*
to the stream (NOT what the console prints). Sure enough, everything is
correctly placed in the stream, null and all.
Conclusion => Output stream is the one to blame; D passes everything correctly
to the stream.
Gonna see how this behaves on linux next.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list