Hi!

Andy Wingo <wi...@pobox.com> skribis:

> Just thinking aloud here -- Windows has this O_BINARY thing that
> translates CRLF to LF when reading, and LF to CRLF when writing.  It
> seems to me to be a useless thing.  We already have our own i/o
> abstractions and should deal with CRLF vs LF in Scheme, I think:

Yes.

>   The (newline) function can write CRLF
>   The ~% format directive should DTRT
>   read-line should DTRT

IMO the correct abstraction here is transcoders à la R6RS.  The problem
is that scm_t_port doesn’t have any slot to specify the EOL style, but
it would need one.

> So, what do you think about always adding O_BINARY to files that Guile
> opens?

Yes, but only when there’s a per-port EOL style, since otherwise we’d
just remove functionality, no?

Ludo’.


Reply via email to