File.write introduces \r regardless of presence

HuskyNator HuskyNator at protonmail.ch
Sat Jul 16 20:46:00 UTC 2022


On Saturday, 16 July 2022 at 20:08:38 UTC, Adam D Ruppe wrote:
> The default here is write in text mode, change the "w" to "wb" 
> and it won't molest your line endings any more.

Thank you, that worked.

This raises 3 questions for me.
1. Are there any nasty pitfalls with this change that might force 
me to find a workaround? (eg. en/decoding issues or the like?)

2. Does this mean readText reads in binary mode?

3. The documentation refers to `the same semantics as in the C 
standard library fopen function`, would this also include the "x" 
subspecifier in C2011?
_I'm not sure having documentation depend on other documentation 
that may change was a good idea..._


More information about the Digitalmars-d-learn mailing list