Re: converting carriage return
- Posted by Lucius L Hilley III <luciuslhilleyiii at JUNO.COM> Jun 15, 1997
- 853 views
On Sun, 15 Jun 1997 17:39:21 -0700 D & B Edmunds <dae at PACLINK.COM> writes: > >Hello to group! > >I am trying to encrypt a file, using a simple xor routine on each >byte in it. >I find that carriage return-line feed is not converted correctly using >getc(), >and can't figure out a fast way to do this. >--snip > file_in = open("x.in", "r") --file must exist > file_out = open("x.out","w") --output file USE: file_in = open("x.in", "rb") file_out = open("x.out","wb") Open the files in binary mode.