[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile 2.0.9 build on mingw
From: |
Eli Zaretskii |
Subject: |
Re: guile 2.0.9 build on mingw |
Date: |
Wed, 19 Jun 2013 05:59:07 +0300 |
> From: address@hidden (Ludovic Courtès)
> Cc: address@hidden, address@hidden
> Date: Tue, 18 Jun 2013 22:45:34 +0200
>
> I think this patch solves the problem:
>
> diff --git a/libguile/rdelim.c b/libguile/rdelim.c
> index 9d14967..9f16c69 100644
> --- a/libguile/rdelim.c
> +++ b/libguile/rdelim.c
> @@ -154,6 +154,7 @@ SCM_DEFINE (scm_read_line, "%read-line", 0, 1, 0,
> {
> case EOF:
> case '\n':
> + case '\r':
> delim = buf[index];
> break;
>
> Probably the extra case should be #ifdef __MINGW32__, to make sure it
> has no effect on non-Windows users. Thoughts?
Not a good idea, IMO: it will remove lone CR characters as well.
> > I think the solution is to attach to the output port a transcoder that
> > leaves the single newline character at end of line intact. But I
> > couldn't find any example or documentation that would show me how to
> > construct a transcoder for an encoding. make-transcoder wants a
> > codec, but I see no documentation how to make one. IOW, how do I take
> > a string like "iso-8859-15" and make a codec out of it? I trust that
> > you will know, though ;-)
>
> Ah ah, this is an R6RS API that’s not actually fully implemented.
>
> So, there are predefined codecs, like ‘latin-1-codec’. This part is
> implemented, in terms of ‘set-port-encoding!’.
>
> However the CR/LF transcoders are not implemented.
Too bad. The text/binary I/O issue on Windows is not really reliable
without that.
- Re: guile 2.0.9 build on mingw, (continued)
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/13
- Re: guile 2.0.9 build on mingw, Ludovic Courtès, 2013/06/16
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/17
- Re: guile 2.0.9 build on mingw, Ludovic Courtès, 2013/06/18
- Re: guile 2.0.9 build on mingw, Mark H Weaver, 2013/06/18
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/18
- Re: guile 2.0.9 build on mingw, Ludovic Courtès, 2013/06/19
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/19
- Re: guile 2.0.9 build on mingw,
Eli Zaretskii <=
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/19
- Re: guile 2.0.9 build on mingw, Ludovic Courtès, 2013/06/19
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/13
- Re: guile 2.0.9 build on mingw, Ludovic Courtès, 2013/06/16
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/16
- Re: guile 2.0.9 build on mingw, Ludovic Courtès, 2013/06/16
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/16
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/12
- Re: guile 2.0.9 build on mingw, Ludovic Courtès, 2013/06/16
- Re: guile 2.0.9 build on mingw, Eli Zaretskii, 2013/06/12