From unknown Fri Jun 13 10:33:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33057: Guile's reader assumes the port encoding is ASCII-compatible Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 16 Oct 2018 01:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33057 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 33057@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.153965417926327 (code B ref -1); Tue, 16 Oct 2018 01:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Oct 2018 01:42:59 +0000 Received: from localhost ([127.0.0.1]:51652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCENv-0006qZ-EL for submit@debbugs.gnu.org; Mon, 15 Oct 2018 21:42:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCENt-0006qL-BF for submit@debbugs.gnu.org; Mon, 15 Oct 2018 21:42:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCENn-0006xq-EG for submit@debbugs.gnu.org; Mon, 15 Oct 2018 21:42:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45363) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCENn-0006xf-8b for submit@debbugs.gnu.org; Mon, 15 Oct 2018 21:42:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCENm-00063B-Dv for bug-guile@gnu.org; Mon, 15 Oct 2018 21:42:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCENj-0006tF-2p for bug-guile@gnu.org; Mon, 15 Oct 2018 21:42:50 -0400 Received: from world.peace.net ([64.112.178.59]:54380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCENh-0006lU-B4 for bug-guile@gnu.org; Mon, 15 Oct 2018 21:42:46 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gCENa-0003V3-Mv; Mon, 15 Oct 2018 21:42:40 -0400 From: Mark H Weaver Date: Mon, 15 Oct 2018 21:42:05 -0400 Message-ID: <87zhveoefm.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) In several places, Guile's reader assumes that the port encoding is ASCII-compatible. For example: * 'scm_token' reads raw bytes and passes them to the CHAR_IS_DELIMITER macro to check for delimiters. * 'scm_read_mixed_case_symbol' checks for the (optional) postfix keyword syntax by comparing the final _byte_ read by 'read_token' with ':'. * 'scm_read_character' uses 'read_token' to read raw bytes up to the next delimiter, and if it returns a single byte with value 0-127, it is interpreted as the associated ASCII character regardless of the encoding. * 'scm_read_semicolon_comment' reads bytes until it finds one equal to the ASCII code for '\n'. There may be other problems as well. Mark