From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: Re: r6rs-ports.test is failing Date: Fri, 17 Dec 2010 17:38:59 +0100 Message-ID: <87pqt02w2k.fsf@gnu.org> References: <871v5g5wyy.fsf@gnu.org> <20101217163011.4462V.3548.root@cdptpa-web06-z01> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1292603984 15078 80.91.229.12 (17 Dec 2010 16:39:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Dec 2010 16:39:44 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Dec 17 17:39:41 2010 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTdLD-00057n-RN for guile-bugs@m.gmane.org; Fri, 17 Dec 2010 17:39:36 +0100 Original-Received: from localhost ([127.0.0.1]:40378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTdLD-00069e-Cj for guile-bugs@m.gmane.org; Fri, 17 Dec 2010 11:39:35 -0500 Original-Received: from [140.186.70.92] (port=48699 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTdL6-000692-R7 for bug-guile@gnu.org; Fri, 17 Dec 2010 11:39:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTdL2-0006Gv-Hf for bug-guile@gnu.org; Fri, 17 Dec 2010 11:39:28 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:55425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTdL2-0006Gk-Bw for bug-guile@gnu.org; Fri, 17 Dec 2010 11:39:24 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PTdKq-0004sA-SU for bug-guile@gnu.org; Fri, 17 Dec 2010 17:39:12 +0100 Original-Received: from yoda.fdn.fr ([80.67.169.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Dec 2010 17:39:12 +0100 Original-Received: from ludo by yoda.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Dec 2010 17:39:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: yoda.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Frimaire an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:dd82VsndEtqPbSWvpB+exsmMwvc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4912 Archived-At: Hi! writes: > ---- "Ludovic Courtès" wrote: [...] >> (define p (open-bytevector-input-port #vu8(255 1 2 3 103 110 117))) >> (set-port-conversion-strategy! p 'substitute) >> (get-line p) >> >> Here on x86_64-linux-gnu, with libunistring 0.9.3, it returns a >> 7-character string ending in “gnu”. > > scheme@(guile-user)> (use-modules (rnrs)) > scheme@(guile-user)> (define p (open-bytevector-input-port #vu8(255 1 2 3 103 110 117))) > scheme@(guile-user)> (set-port-conversion-strategy! p 'substitute) > scheme@(guile-user)> (get-line p) > $1 = "�\x01\x02\x03gnu" And this? (let* ((t (make-transcoder (utf-8-codec) (native-eol-style) (error-handling-mode replace))) (b (open-bytevector-input-port #vu8(255 1 2 3 103 110 117))) (tp (transcoded-port b t))) (port-conversion-strategy tp)) Ludo’.