ciapecki wrote: / ... > I was that stupid and forgot to open the writable file as binary "wb" > (before I had "w" only) Don't kick yourself too hard, the error lies with Microsoft trying to golf its way out of a thicket of its own making. There never should have been two standard line endings (actually three if you include the Mac), and there never should have been two path delimiters either, both of which cause endless headaches for cross-platform coders. The reason these variations exist is so someone can say, "my software is different, unique, patentable, now you have to pay me for it." Even if the differences convey no benefit to the users. -- Paul Lutus http://www.arachnoid.com