unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-103-gc399333
       [not found] <E1OPfJh-0004w4-4w@vcs-noshell.in.savannah.gnu.org>
@ 2010-06-19 21:15 ` Ludovic Courtès
  0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2010-06-19 21:15 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Hi,

"Andy Wingo" <wingo@pobox.com> 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’.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-06-19 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1OPfJh-0004w4-4w@vcs-noshell.in.savannah.gnu.org>
2010-06-19 21:15 ` [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-103-gc399333 Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).