[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-10
From: |
Ludovic Courtès |
Subject: |
Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-103-gc399333 |
Date: |
Sat, 19 Jun 2010 23:15:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hi,
"Andy Wingo" <address@hidden> writes:
> +(define (open-string-input-port str)
> + "Open an input port that will read from @var{str}."
> + (open-input-string str))
> +
> +(define (open-string-output-port)
> + "Return two values: an output port that will collect characters written to
> it
> +as a string, and a thunk to retrieve the characters associated with that
> port."
> + (let ((port (open-output-string)))
> + (values port
> + (lambda () (get-output-string port)))))
I think that by default the opens should wrapped in a
(with-fluids ((%default-port-encoding "UTF-8"))
(open-*-string ...))
so that they are Unicode-capable (info "(guile) String Ports").
Thanks,
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-103-gc399333,
Ludovic Courtès <=