On Sun, Aug 24, 2014 at 8:04 PM, John Cowan <co...@mercury.ccil.org> wrote: > Michele La Monaca scripsit: > >> ... but binaries do. Yet, open-input-file will open them as text files >> in Windows and as binaries in Unix (by default). > > The short answer to that is that there is a way of opening binary > files as binary: with (open-input-file "foo" #:binary) in Chicken, > open-binary-input-file in R7RS. In any case, files are opened by > default as text in both Windows and Posix, though in Posix there is no > distinction.
On the same page at last. On my first mail I was just asking to make (open-input-file FILE #:binary) the default behaviour (it is already so in Unix given there's no such a text mode there). Bad idea? > What is a genuine restriction, imposed for backward compatibility, is > that current-input-port and current-output-port initiall refer to text > mode ports. Given there is no such a concept in Posix, I guess they fallback to binary ports on Unix while they are true text ports on Windows. Ouch. _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users