in reply to Re^2: Convert binary file to ascii
in thread Convert binary file to ascii

That makes no sense. Nothing in the snippet I posted will care, or even notice whether there is an '0a' character in the data it is processing.

The only time characters get 'converted' is of the file is read with CRLF translation in effect, which it won't be if you have binmoded the file as you did in the OP (and as I mentioned above.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: Convert binary file to ascii
by richz (Beadle) on Jun 22, 2007 at 19:50 UTC
    I am using binmode as in the OP, but I am seeing some strange behavior. With one of my input files it did skip "0a" bytes. I created a new test file with some "0a" bytes, but with this file it worked correctly, not skipping the "0a" bytes as you suggested. I am doing more investigation to see what's really going on.
        I'm not sure. I updated my post right above yours with some more information on the exact behavior. I have a sample input file that causes the behavior but I guess I don't know how to share it with you.