From: mac Date: 2006-01-26T13:42:00+09:00 Subject: Re: CR/LF in data read from a socket ------=_Part_12819_28027930.1138250505742 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Pit, Thanks for the correction, that fixed it! Really appreciate it. There is obiviously lack of dacumentation in Ruby world. On 1/25/06, Pit Capitain wrote: > > mac schrieb: > > outputFile =3D 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 =3D 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 > > ------=_Part_12819_28027930.1138250505742--