This just can't be right, WriteByteString writes a pascal-style string
WriteLine just writes a line of text, WriteByteString writes a 16bit length of following content. It can't make sense to suddenly stick a pascal-style string in at the end of a file that's otherwise plain text. original git id that introduced the use of WriteByteString here was ea76474a back in 2002 Perhaps this worked because partial strings never ended up as trailing content, so only ever had an empty string as the final partial string, so a 0x0000 got appended, as opposed to a newline, so it appeared to do the right thing.
Showing
Please
register
or
sign in
to comment