chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] open-input-file and binary mode


From: Michele La Monaca
Subject: Re: [Chicken-users] open-input-file and binary mode
Date: Sun, 24 Aug 2014 18:42:27 +0200

On Fri, Aug 22, 2014 at 9:06 PM, John Cowan <address@hidden> wrote:
> Michele La Monaca scripsit:
>
>> AFAICT, Posix systems treat text files as binaries even if you don't
>> explicitly say so. Windows does not.
>
> That's true, but the only difference is that CR-LF is mapped to CR
> in text mode input and the other way around in text mode output, and ^Z
> is treated as EOF in text mode input.

So, let me understand, are you comfortable about that?

$ cat -e f.txt
^Z1234$

(with-input-from-file "f.txt" read-line) ;; unix
"\x1a1234"

(with-input-from-file "f.txt" read-line) ;; windows
!eof



reply via email to

[Prev in Thread] Current Thread [Next in Thread]