From: Pit Capitain Date: 2006-01-25T16:52:48+09:00 Subject: Re: CR/LF in data read from a socket mac schrieb: > outputFile = File.new( "test_image"+ind.to_s,"w") > outputFile.syswrite(pdu) > ... > When I load the output file in to a hex editor (Ultraedit) I see "0D" and > "0A" chars (CR and LF) in the file, several of them where they should not > be. Hi Mac, if you're on Windows you have to open the output file in binary mode: outputFile = File.new( "test_image"+ind.to_s, "wb" ) Also look at the block form of File.open to automatically close the output file. Regards, Pit