Hi,

"Andy Wingo" <wi...@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’.

Reply via email to