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: Klaus Stehle <klaus.stehle <at> uni-tuebingen.de>
To: 11197 <at> debbugs.gnu.org
Subject: bug#11197: problems with string ports and unicode
Date: Sat, 7 Apr 2012 22:07:01 +0200 (CEST)
[Message part 1 (text/plain, inline)]
Hi,

;;;; a very very short example script to describe the problem:

;; open a string port with unicode characters >= 0x0100
(define p (open-input-string "čtyří"))


Put the line into a script and start guile. You will see the output:
=> Backtrace:

That's all, and guile will hang in an eternal loop.

If you enter the line interactively into the REPL, everything works
properly and you can read all characters with (read-char p).



;;;; another very short script, which is possibly the same problem:

;; open a string port and unread a unicode character >= 0x0100
(define p (open-input-string "ibenik"))
(unread-char #\Š p)


Running these two lines as a script generates an error message:
=> ERROR: In procedure unread-char:
=> ERROR: Throw to key `encoding-error' with args
          `("scm_ungetc" "conversion to port encoding failed" 84 #f #\540)'.

If you enter the lines interactively into the REPL, everything works
properly and you can read all characters with (read-char p).


Cheers,
Klaus Stehle


----------------------------
guile --version
guile (GNU Guile) 2.0.5

uname -srm
Linux 2.6.32-5-amd64 x86_64

echo $LANG
de_DE.UTF-8

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.