From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.bugs Subject: bug#18536: [PATCH] Fix unread-string for characters 0x80 <= c < 0xf0 in UTF-8 Date: Tue, 23 Sep 2014 17:10:19 +0200 Message-ID: <1411485019-768-1-git-send-email-dak@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1411486716 14896 80.91.229.3 (23 Sep 2014 15:38:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Sep 2014 15:38:36 +0000 (UTC) Cc: David Kastrup To: 18536@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Sep 23 17:38:28 2014 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XWSAZ-0003Bv-LJ for guile-bugs@m.gmane.org; Tue, 23 Sep 2014 17:38:23 +0200 Original-Received: from localhost ([::1]:53961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSAZ-0001xi-8U for guile-bugs@m.gmane.org; Tue, 23 Sep 2014 11:38:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSAS-0001uk-QM for bug-guile@gnu.org; Tue, 23 Sep 2014 11:38:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWSAK-0007mQ-VV for bug-guile@gnu.org; Tue, 23 Sep 2014 11:38:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWSAK-0007lF-RS for bug-guile@gnu.org; Tue, 23 Sep 2014 11:38:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XWRo0-0003dR-9F for bug-guile@gnu.org; Tue, 23 Sep 2014 11:15:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Kastrup Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 23 Sep 2014 15:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18536 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141148526713908 (code B ref -1); Tue, 23 Sep 2014 15:15:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Sep 2014 15:14:27 +0000 Original-Received: from localhost ([127.0.0.1]:50093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWRnP-0003cG-1U for submit@debbugs.gnu.org; Tue, 23 Sep 2014 11:14:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53976) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWRnM-0003c7-Is for submit@debbugs.gnu.org; Tue, 23 Sep 2014 11:14:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWRnH-0001lZ-HS for submit@debbugs.gnu.org; Tue, 23 Sep 2014 11:14:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWRnH-0001kY-FC for submit@debbugs.gnu.org; Tue, 23 Sep 2014 11:14:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWRjr-0002Wl-P3 for bug-guile@gnu.org; Tue, 23 Sep 2014 11:10:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWRjq-00013z-IP for bug-guile@gnu.org; Tue, 23 Sep 2014 11:10:47 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59711) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWRjp-00012g-OF for bug-guile@gnu.org; Tue, 23 Sep 2014 11:10:45 -0400 Original-Received: from localhost ([127.0.0.1]:38654 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWRjk-0005MO-6J; Tue, 23 Sep 2014 11:10:40 -0400 Original-Received: by lola (Postfix, from userid 1000) id 3D530E61BB; Tue, 23 Sep 2014 17:10:28 +0200 (CEST) X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7583 Archived-At: * libguile/ports.c (scm_ungetc_unlocked): Fix bad reencoding. The code (with-input-from-string "" (lambda () (unread-string "\"=C3=A4\"" (current-input-port)) (read))) returns "?" instead of "=C3=A4". This bug was introduced in commit be7ecef05c1eea66f30360f658c610710c5cb22e Signed-off-by: David Kastrup --- libguile/ports.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguile/ports.c b/libguile/ports.c index 8185d85..3129282 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -2139,7 +2139,7 @@ scm_ungetc_unlocked (scm_t_wchar c, SCM port) =20 if (pti->encoding_mode =3D=3D SCM_PORT_ENCODING_MODE_UTF8) { - if (c < 0xf0) + if (c < 0x80) { result_buf[0] =3D (char) c; result =3D result_buf; --=20 1.9.1