[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] open-input-file and binary mode
From: |
John Cowan |
Subject: |
Re: [Chicken-users] open-input-file and binary mode |
Date: |
Sun, 24 Aug 2014 13:22:35 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Michele La Monaca scripsit:
> 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
It's annoying in principle, but not in practice. Text files don't
normally contain ^Zs, which is precisely why DEC chose it as an
EOF indicator back when file sizes were rounded up to the nearest
disk block (sometimes there was just one ^Z, sometimes the whole
rest of the block was filled with them). Windows essentially
retains this feature for backward compatibility with CP/M, RT-11,
and OS/8, which shows just how irrelevant it is.
--
John Cowan http://www.ccil.org/~cowan address@hidden
My confusion is rapidly waxing
For XML Schema's too taxing:
I'd use DTDs / If they had local trees --
I think I best switch to RELAX NG.
- [Chicken-users] open-input-file and binary mode, Michele La Monaca, 2014/08/22
- Re: [Chicken-users] open-input-file and binary mode, John Cowan, 2014/08/22
- Re: [Chicken-users] open-input-file and binary mode, Michele La Monaca, 2014/08/22
- Re: [Chicken-users] open-input-file and binary mode, John Cowan, 2014/08/22
- Re: [Chicken-users] open-input-file and binary mode, Michele La Monaca, 2014/08/24
- Re: [Chicken-users] open-input-file and binary mode,
John Cowan <=
- Re: [Chicken-users] open-input-file and binary mode, Michele La Monaca, 2014/08/24
- Re: [Chicken-users] open-input-file and binary mode, John Cowan, 2014/08/24
- Re: [Chicken-users] open-input-file and binary mode, Michele La Monaca, 2014/08/24
- Re: [Chicken-users] open-input-file and binary mode, John Cowan, 2014/08/24