GNU bug report logs - #11197
problems with string ports and unicode

Previous Next

Package: guile;

Reported by: Klaus Stehle <klaus.stehle <at> uni-tuebingen.de>

Date: Sat, 7 Apr 2012 20:09:01 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 11197 <at> debbugs.gnu.org, Klaus Stehle <klaus.stehle <at> uni-tuebingen.de>
Subject: bug#11197: problems with string ports and unicode
Date: Wed, 20 Jun 2012 22:58:39 +0200
Hi,

ludo <at> gnu.org (Ludovic Courtès) skribis:

> @@ -23,10 +23,16 @@
>  ;;; Code:
>  
>  (define-module (srfi srfi-6)
> -  #:re-export (open-input-string open-output-string get-output-string))
> +  #:export (open-input-string open-output-string)
> +  #:re-export (get-output-string))
>  
> -;; Currently, guile provides these functions by default, so no action
> -;; is needed, and this file is just a placeholder.
> +(define (open-input-string s)
> +  (with-fluids ((%default-port-encoding "UTF-8"))
> +    ((@ (guile) open-input-string) s)))
> +
> +(define (open-output-string)
> +  (with-fluids ((%default-port-encoding "UTF-8"))
> +    ((@ (guile) open-output-string))))

I’ve applied it as commit ecb48dccbac6b8fdd969f50a23351ef7f4b91ce5.

Thanks,
Ludo’.




This bug report was last modified 12 years and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.