Quote Originally Posted by angor
> I don't think that this is a problem that you can simply reverse by converting all CR/LF pairs back to new line,
> since there may be some legitimate bytes in the binary that do match CR/LF.

But would these occurrences not have been translated to CRCRLF?
s,CRLF,LF, (hey - this is meant symbolically would then restore the original state.
Maybe. I though aout this and that's why I changed my wording from a statement that it absolutely can't be fixed to this wording. But I don't want to be over encouraging and something was and still is nagging at the back on my mind that says there is a got-ya waiting to happen if one tries this. But I was low on sleep when I wrote it and still am, just can't put my finger one where it could go wrong. And, of course, we don't really know how his file became corrupt, although my past experience points to this as a likely source. So I gave the poster the best info I could; if he's up to the simple code to make the change then good luck to him, and he has the md5 of what the result should be to check himself. Hopefully he will post back and let us know what happens.