On Fri, 11 Dec 2020, Sven Schreiber wrote:
I think I'm experiencing a small glitch with gretl's handling
of
cross-platform line endings on Windows when printing to a file.
Consider this:
<hansl>
s = readfile("test.txt") # this file is attached
set verbose off
outfile test2.inp # this is also attached
print s
end outfile
</hansl>
The newlines in test.txt are Windows-style CRLF.
Heh, actually they're not (in the attachment). The "newlines" are
old-Mac style, CR only. The (hex) bytes are as follows (CR = 0d; LF
= 0a, not present):
68 65 79 0d 68 6f 0d 6c 65 74 27 73 0d 67 6f
(with no newline at the end). If I convert it to CR-LF line endings
(using emacs), then use readfile() on the modified file and print
the result in gretl, I get correct results -- if by "correct" we
mean one word per line with no spaces between lines.
Allin