
3 Apr
2008
3 Apr
'08
6:03 p.m.
Soren Soe [soren.soe@xilinx.com] wrote:
It appears boost::iostreams::newline_filter(posix) converts all CRs into LFs rather than just converting the sequence CRLF. In other words: "\rtext\r\r\n" is converted to "\ntext\n\n" when I would have expected "\rtext\r\n". Indeed the latter is what dos2unix does on my linux system. Is this a bug in the newline_filter?
I just had a chance to look at newline_filter myself. I looks to me
like it also converts from Mac-format text files (carriage return only)
to Unix. It auto-detects the input format and allows mixed-format input
streams.
In your example ("\rtext\r\r\n"), it interprets the text as
"