R
Rick C. Hodgin
This is fascinating. My algorithm just has to look for a single character
which is always a line-ending and never has to worry about it.
Would that such a feature works everywhere. It doesn't. It's why I began
working with binary files a long time back (1990s). I have never looked
back. It may have been due to buggy function implementations back then,
but nonetheless, when I have control over code myself it's never an issue.
You're missing the point. If you were doing this the sane way, you would
not have to type the \r, *and* you would never have problems in text editors.
It's part of having total ownership of the code. By me being in control of
exactly what it does at all points, I can always find out exactly what the
problem is. When I rely on other tools to do something for me ... there's
that black box thing. I don't know exactly what's going on in there, so it's
a potential cause for problems. In some cases the black box is unavoidable,
and in most cases it's not an issue. As I indicated, I had issues with text
file processing back a long while ago, and I just switched and have not had
any issues since then.
Except that you're creating files which have extra characters in them which
will sometimes be interpreted as literal characters which are part of the line.
I haven't seen an editor yet that does that. If I encountered one, I would stop
using that editor because there are plenty that don't.
I am wondering if perhaps you have been confused by the existence of binary
and text modes for ftp, where you really do always want binary.
I want a literal input, byte per byte, on my input files. No translation
except what I do to the files after they're loaded.
Best regards,
Rick C. Hodgin