From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 14:13:42 2024 Received: (at submit) by debbugs.gnu.org; 16 May 2024 18:13:42 +0000 Received: from localhost ([127.0.0.1]:50161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7fbq-0001qD-4K for submit@debbugs.gnu.org; Thu, 16 May 2024 14:13:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:51594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7fbl-0001q7-7k for submit@debbugs.gnu.org; Thu, 16 May 2024 14:13:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7fbi-0005ZH-Fp for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:13:34 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7fbW-0005Gt-2e for bug-gnu-emacs@gnu.org; Thu, 16 May 2024 14:13:33 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2e3e18c24c1so12557171fa.1 for ; Thu, 16 May 2024 11:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715883200; x=1716488000; darn=gnu.org; h=to:cc:date:message-id:subject:mime-version:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=NsCLKWBALa4YtKzEy2+S9ageaZN3CXP1MrTdqWzs2KI=; b=IkSYYLrJSKqTFe5fiLHHcvHOAoKGdydOtiLUOPIrCsqd11zV1jiOQQzZfii7S575nt YqhNhYGN8/DvhXELMam8KyLtJyMH1YCYoreUd+EMla7akJlFvErf32EVzHHkq+jSAEf1 5pmT/yXgGu1QgdhupaX2laWFCHowM0WiYZxKptx6YzwLdbSOjfsNyselaTDxyYX6Z8Su MpGYn0pI6RXkN3MfzbLH5oAnR878inXh+0IpX76PfIThz5/xQzFapokGsTcJV6wZgJdG T07f8oZZZFKTW5tMfN0xDqFA1QXwPLGjs9vSyB/e2LJbs0PX/g9bDR5uLw+ylyGI4VNv Hpyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715883200; x=1716488000; h=to:cc:date:message-id:subject:mime-version:from:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NsCLKWBALa4YtKzEy2+S9ageaZN3CXP1MrTdqWzs2KI=; b=NCB2OW++XlQobglAXErmJ5KYpG1JaTOm3NKkKmpK9aXh2qu0bI0QHAJ5uIC49iUg+p b9mZniUjBtqkm14wa/QQvEvjA5IXyuTM7vEDvDxRtSne42bp/erJeohxd8xcaqt/+KjP LE/BZzvtJUn/431UZU61ltzM3UC+WMGkZoafdDQvqfJ1Mnd/xjq5hjp2lRLmf7WS1JsS 1f7MRoskQXfxclXKgT3swsBrSlhqJpjlVOr+M+rDpqUFd6Wpnv6i6cqZJCEARJevssJy 8f5s0qqY+TziISesFaddbBOu5HORkzZtBLwi4nDT6wBB/f3CXD5iuDutw7LXzVjlrGnB uQsw== X-Gm-Message-State: AOJu0YxsO0n7YHQJp2fLLMqAaBEKOpUKWuF5ruhDzA2O6xOZlzWSIK4j Q9LxNI13UaBTyRhnLQJ31T5zpI3uU5jktvuZde4oPV7cj6jxVvcq5wHm+g== X-Google-Smtp-Source: AGHT+IG1uY5pMMTqEBlASy7TlgdfDXzcfXukOSQfzpmpI1mtW0N+jvb+KcNDw7kYavcH1/4tTVg9ZQ== X-Received: by 2002:a05:6512:3d19:b0:51a:b110:3214 with SMTP id 2adb3069b0e04-5221007029cmr15444321e87.49.1715883199401; Thu, 16 May 2024 11:13:19 -0700 (PDT) Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-523b261ad51sm458599e87.224.2024.05.16.11.13.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2024 11:13:19 -0700 (PDT) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: multipart/mixed; boundary="Apple-Mail=_2685EA9B-3ACD-4D1D-81B9-D9031379C60E" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: (read FUNCTION) uses Latin-1 [PATCH] Message-Id: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> Date: Thu, 16 May 2024 20:13:18 +0200 To: Emacs Bug Report X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=mattias.engdegard@gmail.com; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Stefan Monnier 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: -2.3 (--) --Apple-Mail=_2685EA9B-3ACD-4D1D-81B9-D9031379C60E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 When `read` is called with a function as stream argument, the return = values of that function are often interpreted as Latin-1 characters with = only the 8 low bits used. Example: (let* ((next '(?A #x12a nil)) (f (lambda (&rest args) (if args (push (car args) next) (pop next))))) (read f)) =3D> A* ; expected: A=C4=AA This is a result of `readchar` setting *multibyte to 0 on this code = path. The reader is not very consistent: inside string and character literals, = the code seems to work as expected. The fix is straightforward (attached). --Apple-Mail=_2685EA9B-3ACD-4D1D-81B9-D9031379C60E Content-Disposition: attachment; filename=read-from-function.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="read-from-function.diff" Content-Transfer-Encoding: quoted-printable diff=20--git=20a/src/lread.c=20b/src/lread.c=0Aindex=20= c92b2ede932..2626272c4e2=20100644=0A---=20a/src/lread.c=0A+++=20= b/src/lread.c=0A@@=20-422,6=20+422,8=20@@=20readchar=20(Lisp_Object=20= readcharfun,=20bool=20*multibyte)=0A=20=20=20=20=20=20=20goto=20= read_multibyte;=0A=20=20=20=20=20}=0A=20=0A+=20=20if=20(multibyte)=0A+=20= =20=20=20*multibyte=20=3D=201;=0A=20=20=20tem=20=3D=20call0=20= (readcharfun);=0A=20=0A=20=20=20if=20(NILP=20(tem))=0Adiff=20--git=20= a/test/src/lread-tests.el=20b/test/src/lread-tests.el=0Aindex=20= cc17f7eb3fa..41c9256a9bf=20100644=0A---=20a/test/src/lread-tests.el=0A= +++=20b/test/src/lread-tests.el=0A@@=20-387,4=20+387,19=20@@=20= lread-skip-to-eof=0A=20=20=20=20=20(goto-char=20(point-min))=0A=20=20=20=20= =20(should-error=20(read=20(current-buffer))=20:type=20'end-of-file)))=0A= =20=0A+(ert-deftest=20lread-from-function=20()=0A+=20=20;;=20Test=20= reading=20from=20a=20stream=20defined=20by=20a=20function.=0A+=20=20(let=20= ((make-reader=20(lambda=20(chars)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(lambda=20(&rest=20args)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= args=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(push=20(car=20args)=20chars)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(pop=20= chars))))))=0A+=20=20=20=20(dolist=20(seq=20'((?A=20?B)=20(?E=20?=C3=A4=20= ?=C3=BF)=20(?A=20?=CE=A9)=20(?*=20?=E2=98=83)=20(?a=20#o303=20#o245=20= ?b)))=0A+=20=20=20=20=20=20(let=20((str=20(apply=20#'string=20seq)))=0A+=20= =20=20=20=20=20=20=20(should=20(eq=20(read=20(funcall=20make-reader=20= seq))=20(intern=20str)))=0A+=20=20=20=20=20=20=20=20(let=20((quoted-seq=20= `(?\"=20,@seq=20?\")))=0A+=20=20=20=20=20=20=20=20=20=20(should=20(equal=20= (read=20(funcall=20make-reader=20quoted-seq))=20str)))))=0A+=20=20=20=20= (dolist=20(c=20'(?A=20?=C3=A4=20?=C3=BF=20?=CE=A9=20?=E2=98=83))=0A+=20=20= =20=20=20=20(should=20(eq=20(read=20(funcall=20make-reader=20`(??=20= ,c)))=20c)))))=0A+=0A=20;;;=20lread-tests.el=20ends=20here=0A= --Apple-Mail=_2685EA9B-3ACD-4D1D-81B9-D9031379C60E-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 14:48:07 2024 Received: (at 70988) by debbugs.gnu.org; 16 May 2024 18:48:07 +0000 Received: from localhost ([127.0.0.1]:50351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7g99-0002Jy-56 for submit@debbugs.gnu.org; Thu, 16 May 2024 14:48:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7g94-0002JR-Uw for 70988@debbugs.gnu.org; Thu, 16 May 2024 14:48:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7g8x-0005HX-4V; Thu, 16 May 2024 14:47:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=WuSDusavepW5zeVFHFNG9WEzTnEyFCXmTpez/9Br28E=; b=jy9tcBcbSz1M3UajjfFL sZvySlfKhpp/4XB/v329PQtTHSUsMLGxZntAXhPdD49uYuClfHoQPNmaLOgIR2zEhlDhy2grPUh17 /T6Grw9uf/a4TeHEpHvqDkjyt5RfeFDeeb4LbhH+Bfq2Q3x2Y644Hl3aAaT4D7F3vV9+K57fvYo9P C1fiTklf3Sbm0ttuZHlA82YhcQUBozrCHDOih5+mjtrzs8sRVHrX+5GG5ff7/KJ1zORGP7zdw9rB1 ym9sIfX1Ih70ncxLxhY5zGwWtZxQWpENpwUcYBNikE2jS8UsKNV+/Vt8hjtoayjzG8qRWON2zrByM SLECUV//AWuX/g==; Date: Thu, 16 May 2024 21:47:52 +0300 Message-Id: <86seyhh9uv.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Thu, 16 May 2024 20:13:18 +0200) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -3.3 (---) > Cc: Stefan Monnier > From: Mattias Engdegård > Date: Thu, 16 May 2024 20:13:18 +0200 > > When `read` is called with a function as stream argument, the return values of that function are often interpreted as Latin-1 characters with only the 8 low bits used. Example: > > (let* ((next '(?A #x12a nil)) > (f (lambda (&rest args) > (if args > (push (car args) next) > (pop next))))) > (read f)) > => A* ; expected: AĪ > > This is a result of `readchar` setting *multibyte to 0 on this code path. When is this situation relevant? How many uses of function-as-a-stream are there out there? In general, I wouldn't touch these rare cases with a 3-mile pole. The gain is generally very small (satisfaction from some abstract sense of correctness aside), while the risk to break some code is usually high. It is better to document this behavior and move on. > The fix is straightforward (attached). > > diff --git a/src/lread.c b/src/lread.c > index c92b2ede932..2626272c4e2 100644 > --- a/src/lread.c > +++ b/src/lread.c > @@ -422,6 +422,8 @@ readchar (Lisp_Object readcharfun, bool *multibyte) > goto read_multibyte; > } > > + if (multibyte) > + *multibyte = 1; > tem = call0 (readcharfun); Is it an accident that the code does the same only _after_ the call to readbyte? From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 15:47:16 2024 Received: (at 70988) by debbugs.gnu.org; 16 May 2024 19:47:16 +0000 Received: from localhost ([127.0.0.1]:50618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7h4K-00031s-8d for submit@debbugs.gnu.org; Thu, 16 May 2024 15:47:16 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:52435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7h4E-00031a-SF for 70988@debbugs.gnu.org; Thu, 16 May 2024 15:47:10 -0400 Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52388d9ca98so2280988e87.0 for <70988@debbugs.gnu.org>; Thu, 16 May 2024 12:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715888758; x=1716493558; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=zTO8RNwfZEG/9W0EWHsalnvGBH+Mi3uxXkLUvFqvt74=; b=ULFxohlgIY6DJHpOR7yzht4XEYUUCrUXs93EDWplmpDqPO+3ZxRAp/HKtoGtbg6qYY fqV7AkPi2J85ZcMEb3Qt/wwmeBx+u8Q1FOZBbddHauGT4PCFrQdwFhlbWtO4SY7qD7jS 41lb6j7u4N+5HKY797SNIw/9K1z93sVJamGPjX3UzvNxXwOXPhI7bE1O4QkVcQEesyML ySpbnGWTDO9jtoT+67jmpf/0uzWHKH5Odu1yKC0anh/sR7+wCInnvw5KW+QIk9alXsd8 VF224+pzyzHqLYWzhzojbYKCEYXb9JVUEo+LwnIp+xXxq746+2DKtNRW52YOMcHIKswL lZjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715888758; x=1716493558; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zTO8RNwfZEG/9W0EWHsalnvGBH+Mi3uxXkLUvFqvt74=; b=dYHZyDG2nssN9CfjdtEaHODI3IFzquDfF/LIauiRPX0iemcleZePRWfRx4X5FX1pGp 1+35ZNaNLjcsO1cDnF/Z921eHatCMggeqjyWtfOQxiJj4+e0If1AyVhMoiPGF2UE85Us 9g5P/lOMRtDp90UkAtkoVYCDOc1EL8il43V7xh9L21kNrjkLCTdiOxZp1aPg1QEr2XWp ol6PpWBXZA3tFj6iAJrg+Hwwv3OKETIQKTtGMAKYPNB3TJD2KcKpqhA0PFIx1JWEcGnE l+ZRa2EJnj7y97TrvHwhT9DUpMjXOsf1f5/rqXnmuo3fiKXfQVUaj7oUPB80h//0KTtg 5LSQ== X-Gm-Message-State: AOJu0Yxp93fXwtxLZMuRNO7KdQhPJmGNvc7wwXH5YceJFUuA9uxkK2hQ 0mIhU1L8yKqOksfHN08alL9gqUktfmuMxGbpqsTyL0XH97pg5wuh X-Google-Smtp-Source: AGHT+IFdTvxvsZtZSbKRmXv1Sexj3vyxBO8xXZmo9ObEU7NzMmk9cmtK57eiZRV+W7bCCQ9H/OkJNw== X-Received: by 2002:ac2:4c85:0:b0:51f:5d1a:b320 with SMTP id 2adb3069b0e04-5221047585dmr14920154e87.68.1715888758306; Thu, 16 May 2024 12:45:58 -0700 (PDT) Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-521f35ba59bsm3049807e87.65.2024.05.16.12.45.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2024 12:45:57 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <86seyhh9uv.fsf@gnu.org> Date: Thu, 16 May 2024 21:45:56 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.0 (-) 16 maj 2024 kl. 20.47 skrev Eli Zaretskii : > When is this situation relevant? How many uses of > function-as-a-stream are there out there? Not many is my guess, which is perhaps why it wasn't found before. I'm doing some performance work on the reader, and quirks in the code = like these become obvious. > Is it an accident that the code does the same only _after_ the call to > readbyte? Yes, I have no reason to believe otherwise. From debbugs-submit-bounces@debbugs.gnu.org Thu May 16 15:54:14 2024 Received: (at 70988) by debbugs.gnu.org; 16 May 2024 19:54:14 +0000 Received: from localhost ([127.0.0.1]:50666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7hB8-00036O-1T for submit@debbugs.gnu.org; Thu, 16 May 2024 15:54:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7hB5-00036G-NT for 70988@debbugs.gnu.org; Thu, 16 May 2024 15:54:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7hAy-0003I3-0B; Thu, 16 May 2024 15:54:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=DkVuF7ZYZ/mECwjWw7xhUZo/iSF3LY/unfoD6jR8S20=; b=U3lv4I9OEgZZD6ajpvo7 oOuyRfQoU4Qq85X/me+i+CclgocRsxFTzvrHtZ+HpDpbWJVxFjAB2WtvEcIdxPiwZADzn2Zmatais 2T2w/ms8LcE4dO0cVmOiWKVX0TQRt/DpViQZ5lGl12EEX290D44sJylk0tbVDn1ffXY9Ttfkjg/LD MN16zCeHq7wpauXH/UdGjQGgDizcf8QDasVL6K+as6E48Z0NRCZI1w6KvUoVaLj+LI947hR0nCFrq KD8VoxtofifxC4WDn70FSkqSKW6mNFd4uNE1CkxMuAeyGWbYvkyAyrZIjkUDYpl1ZUfex4VoZa//d /M0xZSmV8SA1ew==; Date: Thu, 16 May 2024 22:54:01 +0300 Message-Id: <86le49h6sm.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Thu, 16 May 2024 21:45:56 +0200) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -3.3 (---) > From: Mattias Engdegård > Date: Thu, 16 May 2024 21:45:56 +0200 > Cc: 70988@debbugs.gnu.org, > monnier@iro.umontreal.ca > > > Is it an accident that the code does the same only _after_ the call to > > readbyte? > > Yes, I have no reason to believe otherwise. To me, it actually looks as done on purpose. From debbugs-submit-bounces@debbugs.gnu.org Fri May 17 04:10:14 2024 Received: (at 70988) by debbugs.gnu.org; 17 May 2024 08:10:14 +0000 Received: from localhost ([127.0.0.1]:53836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7sfO-00037e-54 for submit@debbugs.gnu.org; Fri, 17 May 2024 04:10:14 -0400 Received: from mail-lj1-f169.google.com ([209.85.208.169]:44317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7sfI-00037V-O3 for 70988@debbugs.gnu.org; Fri, 17 May 2024 04:10:13 -0400 Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2e4b90b03a9so18668821fa.1 for <70988@debbugs.gnu.org>; Fri, 17 May 2024 01:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715933340; x=1716538140; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=BDwUzo/+a295j5JeqNJ6jIDTlIIXiO6spdnXijMjKFg=; b=gmfiCtK9KkCC2k4TXeMS5A53o4q0SalFogfBLN+Y3Xe3U0jEPhmt9MmkGTaFI5PwCl 8x1AEo0nQZW2cqq0WaKQ5Qr9Ci+VDmcc+oNgitUI2aibua+hoy1B/hSryCZ2Om64V/x+ VVOo/0nOaQRVswkRqoXbPSSEAubvVSFjPKnmpqGc+ay3WYVbuhlIQ+D8tXBQiXocSsfj Gxxo7CSTuOQxchg/yvr1tEhu+rQ/iIxhL8d1SB1hvjcGXaQcV+eaCR9zWZGbOr/kp5e7 XoarEAhuQQEl0wHrihKiY//MjuKRmZEcgJ/kvso3B9xdnQ8QOFpP+N46tA/5hY8KIp1V 45oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715933340; x=1716538140; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BDwUzo/+a295j5JeqNJ6jIDTlIIXiO6spdnXijMjKFg=; b=FJsX4W4QkmGCJ9IA8YTfSqM+EgZPdpr6kdZsxEjov/jkUEuTV+CA6ypCVo/XNfzgj4 noGIb9PkpKNS4JRQcUMRC6HYUtUn8fvsUKOVywq2cs3Kl2T3dL6QyZAsD4pqrwzpVFPw R+trfb6obehzfesayq3dkLuCR/nUtnR16Nzm4ce65b7soNd2B6j6Mf1Vsu6UvJHqMRZE e8WUoYnVWp8/rADhqtm18n8JM/xWRDwKZuVsOKEhZIwcj4hpV7uePIvFPLN4Tz15CTHA /7DIF5OnPKte1PAwOclN4/T4mlDMURzMnVfG5QxuAK7+ik//sIllhwJHuW9kiZ8qNXjl hn1g== X-Gm-Message-State: AOJu0YyDLhZA5Khe2GbgrjTvhZKDr44CcbIgQ2pTXwFLjrZ8UtrZK1mc OLzzyzjNCurzkiDk3fF+ULLc7zcBUyhF6A83l6GJjE0cO0csp7Cn X-Google-Smtp-Source: AGHT+IHoT9oZ5+AQCoL6QpAPQl5bHGHM0ni3FAbwop1vi3Wff7E727nsX1RTQm+DxGtsRm+SkdSMtQ== X-Received: by 2002:a2e:98cf:0:b0:2e2:b61:aa97 with SMTP id 38308e7fff4ca-2e5204cce6fmr143761651fa.48.1715933339811; Fri, 17 May 2024 01:08:59 -0700 (PDT) Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e6e5037e94sm9543631fa.52.2024.05.17.01.08.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2024 01:08:59 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <86le49h6sm.fsf@gnu.org> Date: Fri, 17 May 2024 10:08:58 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.0 (-) 16 maj 2024 kl. 21.54 skrev Eli Zaretskii : >>> Is it an accident that the code does the same only _after_ the call = to >>> readbyte? >>=20 >> Yes, I have no reason to believe otherwise. >=20 > To me, it actually looks as done on purpose. You could very well be right about that. What I meant is that the order = doesn't matter at all. From debbugs-submit-bounces@debbugs.gnu.org Fri May 17 06:48:21 2024 Received: (at 70988) by debbugs.gnu.org; 17 May 2024 10:48:21 +0000 Received: from localhost ([127.0.0.1]:54476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7v8P-00053u-3L for submit@debbugs.gnu.org; Fri, 17 May 2024 06:48:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7v8M-00053b-Tm for 70988@debbugs.gnu.org; Fri, 17 May 2024 06:48:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7v66-00009c-Oh; Fri, 17 May 2024 06:45:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Vpdii4anCedPOBeN+wrwEJG+fbfiUCbKuIKW6QbpXSM=; b=JLXU/5SiFo745zP/ephu NTeyUsiAtcLm8mkCxP8+xrBGV/sJnEFea+cHU4YAm8um0aWOl4y9DuGV21NqrniZe6iz1Q+t7EpFG S0YcX9xY2QC+sEJBmA21/GDNoKK9rfJxT5TbLKD51/2ghV62JEPi1HkEuheIY38hOrB8LePP8beJZ 7JcR9Uhx40268BQivH/FaYZN0TxblocbIvb0B6ONeCcD3M2LrcElZxm7nuaPikGgaspAqotrR3Sjd 7BPr1DcQLCSvOOwiwx7x7e0ynUZL+S47UuCQ4rf4L3aLAOD9vQog8oQbrp9cb/1UqSSlXzxa5F/WM ALelADJDTSDSrw==; Date: Fri, 17 May 2024 13:45:56 +0300 Message-Id: <8634qghg2j.fsf@gnu.org> From: Eli Zaretskii To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= In-Reply-To: (message from Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 17 May 2024 10:08:58 +0200) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -3.3 (---) > From: Mattias Engdegård > Date: Fri, 17 May 2024 10:08:58 +0200 > Cc: 70988@debbugs.gnu.org, > monnier@iro.umontreal.ca > > 16 maj 2024 kl. 21.54 skrev Eli Zaretskii : > > >>> Is it an accident that the code does the same only _after_ the call to > >>> readbyte? > >> > >> Yes, I have no reason to believe otherwise. > > > > To me, it actually looks as done on purpose. > > You could very well be right about that. What I meant is that the order doesn't matter at all. Doesn't it affect what the readbyte call does? From debbugs-submit-bounces@debbugs.gnu.org Fri May 17 13:09:27 2024 Received: (at 70988) by debbugs.gnu.org; 17 May 2024 17:09:27 +0000 Received: from localhost ([127.0.0.1]:56239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s815D-0004Cm-0m for submit@debbugs.gnu.org; Fri, 17 May 2024 13:09:27 -0400 Received: from mail-lf1-f54.google.com ([209.85.167.54]:45306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s815B-0004Bq-P7 for 70988@debbugs.gnu.org; Fri, 17 May 2024 13:09:26 -0400 Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-51f2ebbd8a7so2795206e87.2 for <70988@debbugs.gnu.org>; Fri, 17 May 2024 10:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715965697; x=1716570497; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=cMem+VUmFnLOtC5CHR1mAmg8csBzq41/14DGUnnpirk=; b=YXD7nGYSYRMUK9Fc7oJKw9bwnzRdgJsTB9pnIRR02pImLM10kBWMra+iHf5g4Fn9kE tHN4rTfganiUSN290N0NimXOjIHfIhCnyw3seJjuxbSjejVqaN4GSOL3pY2lMXUBBqQy JNHxWDbAfjZW2itCjV0PfNBHscf92F7+LiU+FqX3xXdObDw4EKvsUrseyBMFFfa7Vtlx e8sBnf1MtLNHo2B2j+RPxiBriXys2qI2Ssj1pPntbAW6aqUOHjVienrx67k9F2ztyR57 Hj14TYKFeHb50ksTiOom0F0DipRW4MWY3Y948nudwijzW3wzAN//mezcEPpXA/SomN9H lOsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715965697; x=1716570497; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cMem+VUmFnLOtC5CHR1mAmg8csBzq41/14DGUnnpirk=; b=RCinhl2F53NeWRxrlTzKawyBOLg4LwyDaQ12Jxtrj8IYbOrYgn5D1LJ15vIy1kThF4 iGzVehiyqZbVkiSGL+AxMEVj2vhtSq7awlLQ9OUkLcLy9RLGjITglhTSJh7+MMcYZ25M KREV4472CcOGYL+Ig5hFIURxPeZcHBrk7/5nEhok7wGvzWkQybe1BAtDsYWUybxiuW5o SJVbaHQqLPJ/zp0exOoyE+/3flYOWyDc3nLdvf2hqz6d+CyVMcHskbfoFSgK5yW9XB/i LKW/d9A1qN9n3v/RSBeGqNFUwCDX0vQqMDhHLWe/O7sQA925CDxNGZr8ByIGL5JdFtcD Pcjg== X-Gm-Message-State: AOJu0YzQiR2one/UiNx43xWzZln37E4z6U25Uv5FEnPiRdWS0SuEInik s9XxFdR1skB7w4zE6rXTm/EPqD09l3D18FZbvZVu1YyaFBZM8tAD X-Google-Smtp-Source: AGHT+IFd7vD4L5YLK5vKH5BZaodPofsIO7ey8+rtizceDnctrAXF2axv6c8ywN7OITZrC9YChu19WQ== X-Received: by 2002:a05:6512:32ae:b0:523:8a14:9149 with SMTP id 2adb3069b0e04-5238a1491b0mr6251486e87.21.1715965696554; Fri, 17 May 2024 10:08:16 -0700 (PDT) Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-521f38d8b44sm3376307e87.209.2024.05.17.10.08.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2024 10:08:16 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <8634qghg2j.fsf@gnu.org> Date: Fri, 17 May 2024 19:08:15 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.0 (-) 17 maj 2024 kl. 12.45 skrev Eli Zaretskii : >>>>> Is it an accident that the code does the same only _after_ the = call to >>>>> readbyte? >>>>=20 >>>> Yes, I have no reason to believe otherwise. >>>=20 >>> To me, it actually looks as done on purpose. >>=20 >> You could very well be right about that. What I meant is that the = order doesn't matter at all. >=20 > Doesn't it affect what the readbyte call does? No -- the `*multibyte =3D ...` assignment is just an extra return value, = which indicates whether the returned values come from a unibyte or = multibyte source. For any given source (READCHARFUN, in the terminology = of lread.c), the characters will all be unibyte or multibyte, so this = returned `multibyte` flag will typically only be used once by the caller = and saved for future reference. But you are right to question it because lread.c is a royal mess and = many changes have not been made in a clean way. It is unclear whether = it's worth returning the `multibyte` flag at all; it's only used in = special cases. From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 11:44:39 2024 Received: (at 70988) by debbugs.gnu.org; 30 May 2024 15:44:39 +0000 Received: from localhost ([127.0.0.1]:43578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sChxH-0003wX-7J for submit@debbugs.gnu.org; Thu, 30 May 2024 11:44:39 -0400 Received: from mail-lf1-f48.google.com ([209.85.167.48]:55464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sChxF-0003wE-CN for 70988@debbugs.gnu.org; Thu, 30 May 2024 11:44:37 -0400 Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-5295e488248so1161678e87.2 for <70988@debbugs.gnu.org>; Thu, 30 May 2024 08:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717083801; x=1717688601; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=F76qA3naXA6dbOpkal3jxcXa25NQiaoi5E13Q14KveY=; b=OWY8vQe4PcwZr9s3O25S/Whsrmmn9EDS02uHMUbCmIX0jbH7vUAvGSg2lIoXCSi696 /mLQI/IWBEEVf8uzKFjQ4BTqaSvWvooIQiGQB1+p09/NkowPMdmNvkVR+rQm8noCGkLQ KUgCYJAf3JkGLytnJ/jSADN1lOcjbA0slsNzpumDxZsqNwLcQ+y4EMoFuRP6fOcTHHlp q833Qi/sWbaG7roc6K6t1U1mcKd/xCPdzUzbxVsw9HWlZSh30RwCmkGbdw/7qYT5Iu6C Lvo/7piIM80cpCEIBosQBSloJpie8AnbDUd8y4iwJQ8KEUh0FvGCxfsJl1rPz9v+mZx+ Ez5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717083801; x=1717688601; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=F76qA3naXA6dbOpkal3jxcXa25NQiaoi5E13Q14KveY=; b=v975XZfLR1pZYPD9ezBqFQcmzZHPtudupvS+n4o0al1WcCDQDCQZhS3FK3yOvwv4D7 F87pmYRBTA9zemcTlYd6+pqEK6LUWzLYbpSG+1O4tBw0EdjFX0vOwOSwbN5sbe79A+OE Rdm9kTwWWkpg5wYP+swFqofArrxIN5UICIzzrzm0cH7hnvbPmTVnnOV8WR8z9rvblBlF SdjXQBnfTYM8foptDwp0NG/YL4w6C09hJiu9m8ovOGc04ykOIMiSlUrlu/sAwrmrp9zs zLHDtX90tA3le6sthHG4Vv8OM+v88XTG492T7ZDtgUAMelbaW8deOdsuKaDu7ssQiCg8 f5pQ== X-Gm-Message-State: AOJu0YyAeVh5bCbJko8LNy+hKb0Kje0Tp3gng1/zXWUNXyx2METHUV1b mcXFgg+YZSJS5PuaJRz7cuYfmUYYOBfVAY21gNqmTOy9+C74HyRo X-Google-Smtp-Source: AGHT+IGG1/Om2QiBGQNfyEyp2obKGvfJZsrH7LZNYgsRvejMhwqZx6PvgTvkiEhjPMQRMUmxv7QVXA== X-Received: by 2002:ac2:5496:0:b0:529:1dd4:3e76 with SMTP id 2adb3069b0e04-52b7d480865mr1425913e87.59.1717083800308; Thu, 30 May 2024 08:43:20 -0700 (PDT) Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b6f7abff1sm401491e87.260.2024.05.30.08.43.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2024 08:43:19 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> Date: Thu, 30 May 2024 17:43:19 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> To: Eli Zaretskii X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, monnier@iro.umontreal.ca 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: -1.0 (-) After looking further into the Lisp reader/printer I found two more = silent Latin-1 assumptions. In all three cases, I firmly believe the = following to be true: * The behaviour is not intended but just code accidents. * They should hardly affect any user code at all. * They are nevertheless clear bugs which should be fixed. Further on this will have to wait until after Emacs 30 has been branched = to avoid delaying that more important task. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 09:53:09 2025 Received: (at 70988) by debbugs.gnu.org; 12 Feb 2025 14:53:09 +0000 Received: from localhost ([127.0.0.1]:33571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiE6u-0008SF-Fl for submit@debbugs.gnu.org; Wed, 12 Feb 2025 09:53:08 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:53652) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tiE6r-0008Ra-Aa for 70988@debbugs.gnu.org; Wed, 12 Feb 2025 09:53:05 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-ab7f76aeedbso87809966b.3 for <70988@debbugs.gnu.org>; Wed, 12 Feb 2025 06:53:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739371979; x=1739976779; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=tHYJKzY6PioyJd2McsVMUaOy588AphsoY0Pxx0bHJ0U=; b=MnItIGoC/uKSgC5kp1MfZb7nPWkpVqnPdlp/TEgeyPhV8vA+bAl8xkckl/iTPCaQe5 ozFHb88Yq1g20UITrt9e9PgCAmIVZ6Pv2xc7RK87d8cqW8oHCnJLSrhBuw6cXMIc4uc7 9k02lJ5dD17QuE9vzgYFp/ARlDgoZpgop8B/FjG+bY+KgpR3+GWSKHgl9BtergiPMcRf Gmsl9KJBSPsdmzo16jNeTgVIwWdx3umQ3pIeLnGEN1PzMJsM8NExxaeAXhup0RaE/j9U SwCya4xqD0OtD1OdhYVPyLecHvz9fxdtosnd6hGuwDhOWBtn6KQyMJdRQ/xtqxxKIfm6 FjyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739371979; x=1739976779; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=tHYJKzY6PioyJd2McsVMUaOy588AphsoY0Pxx0bHJ0U=; b=Tu2ukn6GZK6zFJHYdmQ2u420VC9JtA/75LydWUB1LWaAvgPey4TNeK14W5+fa5Ty6F izCTzvN2NjL31mSCUs/cNjzztjpT2+J3gK13ort/Dks7+IpQ0QWxlxpMfI3jo4XXPAZ0 GAqxVObJeu88VjtppsnzkOqWVfKOzhE5PI4CZtPWoIXH1jldMemvJiwdNFsxAGx7/sss Owf7XzdGb0R/D3rAceCjxWQJFNbYbLi/xm84szZAniuss7xUNK2AqqOal1Wjk7Gnrs6z jHMaqLvtLT9LprKt25JRErIJk6rwLmIWGpkbr9aW+LgoZACZTsIeZexLIKsZOngwF0Id pSbQ== X-Forwarded-Encrypted: i=1; AJvYcCWNAJX2v4ShQ8Kx3JIJGu061W/RKsily1aPnEGRirXA+eNZ11/1WlUcuJbpJWRsW/BNJRRvfg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyBLNO6Slclb8q2cGeLGzM3iu23mi3F4w26rhTAbtzJQwrlbDE6 CmJzkzvJPUqN2av/7iNC4I1mZuuRIA46ll1kNvLutvgDOvAzEhlnods+pHea2sMtQVyEpehEf4P ebhzxmD4EReU/tWLssnpmysuIDDPci2TZqmJfuQ== X-Gm-Gg: ASbGncvluArfgdoObFAuHVPim6IEC8YaUbOb2pBSF4qZDG/iF2KejBwvpCPKoyfEHCT eNQMRCDvkwt+c6mDdjiUlZFyS8CS9HGCrfZ5wK7+KlMZpJ/9lopxAxe4dcVNF8aJ28zIClc5E40 E= X-Google-Smtp-Source: AGHT+IEIm7r6NexmT5/0LHMhHMn2+L+Y5Ma6SYsUXQ5GKACptrBmlg07l/r3KRFNC8RhzE+zBf1q4IUK33lFB6VFV1I= X-Received: by 2002:a05:6402:51cf:b0:5dc:796f:fc86 with SMTP id 4fb4d7f45d1cf-5deadd9d31cmr8517127a12.16.1739371978926; Wed, 12 Feb 2025 06:52:58 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 12 Feb 2025 06:52:58 -0800 From: Stefan Kangas In-Reply-To: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> MIME-Version: 1.0 Date: Wed, 12 Feb 2025 06:52:58 -0800 X-Gm-Features: AWEUYZmOJ-oSFx_tghElPWrXNxNdRuIEQEO3o-3y5GFEfFLXh60uts3sHS1ZmIA Message-ID: Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca 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: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > After looking further into the Lisp reader/printer I found two more silen= t Latin-1 assumptions. In all three cases, I firmly believe the following t= o be true: > > * The behaviour is not intended but just code accidents. > * They should hardly affect any user code at all. > * They are nevertheless clear bugs which should be fixed. > > Further on this will have to wait until after Emacs 30 has been branched = to avoid delaying that more important task. FWIW, the proposed patch looks like a bug fix to me as well, so I think we should install it. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 11:43:00 2025 Received: (at 70988) by debbugs.gnu.org; 12 Feb 2025 16:43:00 +0000 Received: from localhost ([127.0.0.1]:37985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiFpE-00015O-1U for submit@debbugs.gnu.org; Wed, 12 Feb 2025 11:43:00 -0500 Received: from mail-4316.protonmail.ch ([185.70.43.16]:48057) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiFpB-000155-2W for 70988@debbugs.gnu.org; Wed, 12 Feb 2025 11:42:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1739378570; x=1739637770; bh=zIAQkgJNK8GYMVqSzepUJEOUwv5OAihfD4LqunkRgL4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=wDZXy6xi/OafCATKKecPhxKwlUDHvbecVavHY8i80oUnkmH2hMCxbKTFpM4STo5tC yQQQ+6ZpMxt/zpsUQrNFQIdyJYHph027nyfx5+cut0RhLx++lA+eySNbC5fe/ox7pC LV5evWUUcFgHCkhh9tuN/5d0mArZQgu3JsrWTt/V+61DP1jBHjAvU0smgG79/RDb+s v5Z1P5+MQMGk9Tf8PlZUOmp3ZHGQzlQmwkxFqTJF4TwAu7iAdSXBqvkLkDFbcGkNbA OWdk503nIoqm3BZSt+Gfi0XrqEUmLHTWd4JLLB29zruCeobOHVEqTJKhXoAcerz2+W IV2sUm2cmWVRQ== Date: Wed, 12 Feb 2025 16:42:43 +0000 To: Stefan Kangas From: Pip Cet Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] Message-ID: <877c5vf730.fsf@protonmail.com> In-Reply-To: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 6accb3f2b485f3248cd09e52cd5c2fbf5292c26b MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= , Eli Zaretskii , monnier@iro.umontreal.ca 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: -1.0 (-) "Stefan Kangas" writes: > Mattias Engdeg=C3=A5rd writes: > >> After looking further into the Lisp reader/printer I found two more >> silent Latin-1 assumptions. In all three cases, I firmly believe the >> following to be true: >> >> * The behaviour is not intended but just code accidents. >> * They should hardly affect any user code at all. >> * They are nevertheless clear bugs which should be fixed. >> >> Further on this will have to wait until after Emacs 30 has been branched= to avoid delaying that more important task. > > FWIW, the proposed patch looks like a bug fix to me as well, so I think > we should install it. I think we should think about whether we want to force multibyte to true for all functions, even those never returning non-ASCII chars. Also, the code appears to use XFIXNUM on a Lisp_Object that might not be one. IIUC, the difference is that all-ASCII strings would be unibyte strings in some circumstances. The alternative patch would look something like this: >From bbc65c9be7ccebf034f4d10f018a076ef1e8a4e9 Mon Sep 17 00:00:00 2001 From: Pip Cet Subject: [PATCH] Auto-detect multibyteness of readchar funs (bug#70988) * src/lread.c (readchar): Set *MULTIBYTE if we detect a multibyte character. Return -1 for non-characters rather than crashing. --- src/lread.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lread.c b/src/lread.c index 6af95873bb8..c18c1be3cf5 100644 --- a/src/lread.c +++ b/src/lread.c @@ -398,9 +398,12 @@ readchar (Lisp_Object readcharfun, bool *multibyte) =20 tem =3D call0 (readcharfun); =20 - if (NILP (tem)) + if (!CHARACTERP (tem)) return -1; - return XFIXNUM (tem); + if (multibyte && !ASCII_CHAR_P (XFIXNAT (tem))) + *multibyte =3D true; + + return XFIXNAT (tem); =20 read_multibyte: if (unread_char >=3D 0) --=20 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 14:26:03 2025 Received: (at 70988) by debbugs.gnu.org; 12 Feb 2025 19:26:03 +0000 Received: from localhost ([127.0.0.1]:38341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiIN0-0003hg-Ph for submit@debbugs.gnu.org; Wed, 12 Feb 2025 14:26:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45976) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiIMy-0003h9-QO for 70988@debbugs.gnu.org; Wed, 12 Feb 2025 14:26:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiIMs-00070b-BT; Wed, 12 Feb 2025 14:25:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=yI+GCQTgIINZ4Q7AX7ArfqFZSC7kV5DjX7WMX993psc=; b=SkLBVUEFmpb0CFYx9EVp a5z2I4ABtyf6XIH4XSlMjCdautkAtAlCk3LO2TVZVjw1iduf22p6e8PTgPnU3MkWGuuLvgravuR2S SCO559UR2HSi+N/T3bBXbjSb2bSsumZltKxc3269SPhTatztYdWeUZUeMFZIOApiM39hOgdBgI0Ap OrYBoVwyCFq8Q0Pb1s4W1p5F0f4lPsbGH55IJUN1v2RPs/mF9YLBG0pu4dAuKljZlB0UkrX0bc8kj r+8okrap6dp8HSambnDdWc+1c1fA1MXfv7yTRQdutj77OoTs/yPSN1+5lXUcD7HDR+yQ0ercmehjd rAs/H/Pw6RAsEg==; Date: Wed, 12 Feb 2025 21:25:48 +0200 Message-Id: <86r043j77n.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-Reply-To: <877c5vf730.fsf@protonmail.com> (message from Pip Cet on Wed, 12 Feb 2025 16:42:43 +0000) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <877c5vf730.fsf@protonmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -3.3 (---) > Date: Wed, 12 Feb 2025 16:42:43 +0000 > From: Pip Cet > Cc: Mattias Engdegård , 70988@debbugs.gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca > > The alternative patch would look something like this: > > >From bbc65c9be7ccebf034f4d10f018a076ef1e8a4e9 Mon Sep 17 00:00:00 2001 > From: Pip Cet > Subject: [PATCH] Auto-detect multibyteness of readchar funs (bug#70988) > > * src/lread.c (readchar): Set *MULTIBYTE if we detect a multibyte > character. Return -1 for non-characters rather than crashing. > --- > src/lread.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/lread.c b/src/lread.c > index 6af95873bb8..c18c1be3cf5 100644 > --- a/src/lread.c > +++ b/src/lread.c > @@ -398,9 +398,12 @@ readchar (Lisp_Object readcharfun, bool *multibyte) > > tem = call0 (readcharfun); > > - if (NILP (tem)) > + if (!CHARACTERP (tem)) > return -1; > - return XFIXNUM (tem); > + if (multibyte && !ASCII_CHAR_P (XFIXNAT (tem))) > + *multibyte = true; > + > + return XFIXNAT (tem); AFAIU, the proposed patch was just a bugfix, whereas the above also changes behavior in backward-incompatible ways. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 15:28:15 2025 Received: (at 70988) by debbugs.gnu.org; 12 Feb 2025 20:28:15 +0000 Received: from localhost ([127.0.0.1]:38541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiJLD-0001M6-AD for submit@debbugs.gnu.org; Wed, 12 Feb 2025 15:28:15 -0500 Received: from mail-10631.protonmail.ch ([79.135.106.31]:52263) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiJLA-0001Le-4u for 70988@debbugs.gnu.org; Wed, 12 Feb 2025 15:28:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1739392085; x=1739651285; bh=XTS7wpLyLMZVUE95WXPZiT+5pDU0hMqNeuHJ6QQ3wKg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=Ka79hwC0MbLy1dl8oVbpnM1gnfSxWxtodAWyoE/aMBLE5AcL2wJNyCtTUfS8N+LKU iZTeRYeqbIRm4D513yQwLQpxIJQ5J5NDbO5nAa6t6+bjIg2G9zAWHpqik1fSdEOp+H 4IwJIMMxnYsIsBjx38geBRDKy/bSVvnfYDNiGmrAmxjs8WMmNHSIoN0+7xYwJBVkb1 NH71OeT+PVLWvUKUbTR2grirAnjDaDnMSI0G4VTLGxn3NkNqUQmCRf28iiJkN8wv/x 384qbeY3PLxLwdGm7I08XNJ+dmrr01qheHqCDjnX5tpOljvivKLujUixvd0pIZzYxR SKUh6+WoR0x8w== Date: Wed, 12 Feb 2025 20:27:58 +0000 To: Eli Zaretskii From: Pip Cet Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] Message-ID: <87ed02ewnl.fsf@protonmail.com> In-Reply-To: <86r043j77n.fsf@gnu.org> References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <877c5vf730.fsf@protonmail.com> <86r043j77n.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: de393a67019a052cc13c333ef2c17ec680ce0d35 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -1.0 (-) "Eli Zaretskii" writes: >> Date: Wed, 12 Feb 2025 16:42:43 +0000 >> From: Pip Cet >> Cc: Mattias Engdeg=C3=A5rd , 70988@debbugs.= gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca >> >> The alternative patch would look something like this: >> >> >From bbc65c9be7ccebf034f4d10f018a076ef1e8a4e9 Mon Sep 17 00:00:00 2001 >> From: Pip Cet >> Subject: [PATCH] Auto-detect multibyteness of readchar funs (bug#70988) >> >> * src/lread.c (readchar): Set *MULTIBYTE if we detect a multibyte >> character. Return -1 for non-characters rather than crashing. >> --- >> src/lread.c | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/src/lread.c b/src/lread.c >> index 6af95873bb8..c18c1be3cf5 100644 >> --- a/src/lread.c >> +++ b/src/lread.c >> @@ -398,9 +398,12 @@ readchar (Lisp_Object readcharfun, bool *multibyte) >> >> tem =3D call0 (readcharfun); >> >> - if (NILP (tem)) >> + if (!CHARACTERP (tem)) >> return -1; >> - return XFIXNUM (tem); >> + if (multibyte && !ASCII_CHAR_P (XFIXNAT (tem))) >> + *multibyte =3D true; >> + >> + return XFIXNAT (tem); > > AFAIU, the proposed patch was just a bugfix, whereas the above also > changes behavior in backward-incompatible ways. The other way around, I think: the first proposed patch changed the behavior of readchar to always set the multibyte flag when a function was used, resulting in the creation of symbols whose ASCII names are multibyte strings. The previous behavior was never to set the multibyte flag, which was correct for ASCII strings but not multibyte ones. This patch retains the previous behavior for ASCII symbols, but sets the multibyte flag for non-ASCII symbols, which seems the best we can do if we're given a simple function. If we want to change symbol names to always be multibyte strings, we can do that, but then we probably want to do that or all streams. It also fixes yet another XFIXNUM crash, but those (there are more in lread.c, it seems) should be fixed independently. However, it does give us the ability to extend the API so readcharfun could return a single character string, unibyte or multibyte, to be handled appropriately. Pip From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 01:01:28 2025 Received: (at 70988) by debbugs.gnu.org; 13 Feb 2025 06:01:28 +0000 Received: from localhost ([127.0.0.1]:39648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiSHs-0002gR-Dj for submit@debbugs.gnu.org; Thu, 13 Feb 2025 01:01:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46544) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiSHp-0002gA-RN for 70988@debbugs.gnu.org; Thu, 13 Feb 2025 01:01:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiSHg-0002jl-Ft; Thu, 13 Feb 2025 01:01:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=V/7dN6XSa0jV9IewFFqhEKmpchKc0zhhx2mafMX7/lk=; b=pThcHqG3nWU0 FWAhYHcPjpNvb6GqsVT/A3EKNeZCfWt9DB2L8pQB40mxjWOlcMOlKE8B0rOkODx4lX0OY4xG51LA0 ayx8pjmTMenb8DVwqQL2GZplbhypKWZuDw2aRjHnC9hFYsXDfa9QyBV1yP6ZXQaGzdCY3Tr7ToieA VlBXSU88G/o0L5Dvgr3HeoAw0g1JUTHwFjDKxQfONRmZMW3K1eT8ThN37awulhG1+XrNzYtLwSuod bIEJhRjyIrTu+q+KoUCd8KtuRRqaZbnLg5K/j2c7onXTUC13+6XCISYRIqZk6Cli0eA3dQpE4g861 uZ9U7WNbODtRZFmc3O+TSQ==; Date: Thu, 13 Feb 2025 08:00:57 +0200 Message-Id: <86lduajsdi.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-Reply-To: <87ed02ewnl.fsf@protonmail.com> (message from Pip Cet on Wed, 12 Feb 2025 20:27:58 +0000) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <877c5vf730.fsf@protonmail.com> <86r043j77n.fsf@gnu.org> <87ed02ewnl.fsf@protonmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -3.3 (---) > Date: Wed, 12 Feb 2025 20:27:58 +0000 > From: Pip Cet > Cc: stefankangas@gmail.com, mattias.engdegard@gmail.com, 70988@debbugs.gnu.org, monnier@iro.umontreal.ca > > "Eli Zaretskii" writes: > > >> --- a/src/lread.c > >> +++ b/src/lread.c > >> @@ -398,9 +398,12 @@ readchar (Lisp_Object readcharfun, bool *multibyte) > >> > >> tem = call0 (readcharfun); > >> > >> - if (NILP (tem)) > >> + if (!CHARACTERP (tem)) > >> return -1; > >> - return XFIXNUM (tem); > >> + if (multibyte && !ASCII_CHAR_P (XFIXNAT (tem))) > >> + *multibyte = true; > >> + > >> + return XFIXNAT (tem); > > > > AFAIU, the proposed patch was just a bugfix, whereas the above also > > changes behavior in backward-incompatible ways. > > The other way around, I think: the first proposed patch changed the > behavior of readchar to always set the multibyte flag when a function > was used, resulting in the creation of symbols whose ASCII names are > multibyte strings. The previous behavior was never to set the multibyte > flag, which was correct for ASCII strings but not multibyte ones. > > This patch retains the previous behavior for ASCII symbols, but sets the > multibyte flag for non-ASCII symbols, which seems the best we can do if > we're given a simple function. I'm talking about the CHARACTERP test (why not FIXNUMP?), and the addition of ASCII_CHAR_P test (why would we want an ASCII character to never be considered multibyte?). > If we want to change symbol names to always be multibyte strings, we can > do that, but then we probably want to do that or all streams. I don't understand why you are talking about symbols: AFAIU this code is used in many other cases as well. But even for symbols: why change the current behavior of making their names multibyte? > It also fixes yet another XFIXNUM crash, but those (there are more in > lread.c, it seems) should be fixed independently. I'm okay with adding a FIXNUMP test (which happens in the debugging builds anyway, so any violations probably never happen), but using CHARACTERP changes behavior. > However, it does give us the ability to extend the API so > readcharfun could return a single character string, unibyte or > multibyte, to be handled appropriately. This is also a change in behavior. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 05:09:11 2025 Received: (at 70988) by debbugs.gnu.org; 13 Feb 2025 10:09:11 +0000 Received: from localhost ([127.0.0.1]:40690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiW9f-0002Mo-09 for submit@debbugs.gnu.org; Thu, 13 Feb 2025 05:09:11 -0500 Received: from mail-10630.protonmail.ch ([79.135.106.30]:12931) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiW9b-0002M9-B6 for 70988@debbugs.gnu.org; Thu, 13 Feb 2025 05:09:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1739441340; x=1739700540; bh=NgBWClVjnlgvcQL5Fk2BfuyV+hcsZRr9GBTibaO0Y2I=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=rT7MWtuKRsmmusx2ecYLjzfIj2q1E9kAGP7GWaVrj2XNxNrdZGw+XZSWRKTpjTvDy m/eqNB0MMF3oirIZQlVoMgG2W/VPc3r/ASdKqmsfqFm4eDV3EipvYH7DNtMeUoZDAP cYTdY0mxTXAy38wLETkyzDdBMlPFUrHnk/efAILkfbhtc08oLQoIIp6WkGlEE7S/g1 U6GM9Nj6keUJ1uaXhyl5brwBGbMLaiRFs9EqqoH+ckLdi4DGV5gCdTLO3rbIQTf7Rk flZVU7M8IKeuMBEwuN/sue9SQ+Q43OHxTwIO2oDJ1lTOFE5Ft3COeFbGGuQ+E1RzDC +tLG8zAE/fUVA== Date: Thu, 13 Feb 2025 10:08:54 +0000 To: Eli Zaretskii From: Pip Cet Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] Message-ID: <87a5aqcg2z.fsf@protonmail.com> In-Reply-To: <86lduajsdi.fsf@gnu.org> References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <877c5vf730.fsf@protonmail.com> <86r043j77n.fsf@gnu.org> <87ed02ewnl.fsf@protonmail.com> <86lduajsdi.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: ee9fc3ea3b0c996611da08624e35f180b4d1fb5d MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -1.0 (-) "Eli Zaretskii" writes: >> Date: Wed, 12 Feb 2025 20:27:58 +0000 >> From: Pip Cet >> Cc: stefankangas@gmail.com, mattias.engdegard@gmail.com, 70988@debbugs.g= nu.org, monnier@iro.umontreal.ca >> >> "Eli Zaretskii" writes: >> >> >> --- a/src/lread.c >> >> +++ b/src/lread.c >> >> @@ -398,9 +398,12 @@ readchar (Lisp_Object readcharfun, bool *multiby= te) >> >> >> >> tem =3D call0 (readcharfun); >> >> >> >> - if (NILP (tem)) >> >> + if (!CHARACTERP (tem)) >> >> return -1; >> >> - return XFIXNUM (tem); >> >> + if (multibyte && !ASCII_CHAR_P (XFIXNAT (tem))) >> >> + *multibyte =3D true; >> >> + >> >> + return XFIXNAT (tem); >> > >> > AFAIU, the proposed patch was just a bugfix, whereas the above also >> > changes behavior in backward-incompatible ways. >> >> The other way around, I think: the first proposed patch changed the >> behavior of readchar to always set the multibyte flag when a function >> was used, resulting in the creation of symbols whose ASCII names are >> multibyte strings. The previous behavior was never to set the multibyte >> flag, which was correct for ASCII strings but not multibyte ones. >> >> This patch retains the previous behavior for ASCII symbols, but sets the >> multibyte flag for non-ASCII symbols, which seems the best we can do if >> we're given a simple function. > > I'm talking about the CHARACTERP test (why not FIXNUMP?), and the The function is supposed to return a character, not just any fixnum. > addition of ASCII_CHAR_P test (why would we want an ASCII character > to never be considered multibyte?). It's the other way around, again: if there's a non-ASCII character, we treat the stream as multibyte; if there are ONLY ASCII characters, we treat it as unibyte. >> If we want to change symbol names to always be multibyte strings, we can >> do that, but then we probably want to do that or all streams. > > I don't understand why you are talking about symbols: AFAIU this code > is used in many other cases as well. But even for symbols: why change > the current behavior of making their names multibyte? The current behavior is to make their names unibyte! The current behavior is *changed* by the first patch, and *retained* by my patch. >> It also fixes yet another XFIXNUM crash, but those (there are more in >> lread.c, it seems) should be fixed independently. > > I'm okay with adding a FIXNUMP test (which happens in the debugging > builds anyway, so any violations probably never happen), but using > CHARACTERP changes behavior. If you count "avoids further crashes" as "changes behavior", yes. readcharfun is supposed to return a character or -1. Some callers assume the return value is a valid character, and will crash otherwise. I haven't checked all of them because there are many. >> However, it does give us the ability to extend the API so >> readcharfun could return a single character string, unibyte or >> multibyte, to be handled appropriately. > > This is also a change in behavior. Yes, of course, which is why it's a separate proposal and not part of the patch. Pip From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 05:23:35 2025 Received: (at 70988) by debbugs.gnu.org; 13 Feb 2025 10:23:35 +0000 Received: from localhost ([127.0.0.1]:40759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiWNb-00067R-EZ for submit@debbugs.gnu.org; Thu, 13 Feb 2025 05:23:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40768) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiWNY-000677-Bm for 70988@debbugs.gnu.org; Thu, 13 Feb 2025 05:23:33 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tiWNS-00007E-SK; Thu, 13 Feb 2025 05:23:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3adD/imPhNKlX8rBSprj04VTzFWkex3PSEB9kARg+VE=; b=od8hEmgxKLdI tbEoJUVNMmyjBMYr5gTfTZ6Yy0tZvyx+HYqecuEUQ9yJvzNocstsDzBM0Cjz4AkW1X51o4Cs5zJLo 5S6crdhXxeEyrV2UgoJb4+jq+WGWhNOJx8ro8AhgV369LsXzptcpiEasEegK29XMRVFAnWpDT1gB4 /T+VWNrXii2xiDln7asLykVKkOZuaOzthuD+EhZibnDU+VDtWx/n0l40/zd1jyTPBs91YFtq5rT+j drOq2kLgXkPrKPliY7o00j0N3ap1m2gIBmm3hgIB7x7Ag/ILccEO9+CaWfPUf0xXi5j8YCGNd6mcm A9zrKW5ISJKl+vablpCPMg==; Date: Thu, 13 Feb 2025 12:23:21 +0200 Message-Id: <86ed02i1nq.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-Reply-To: <87a5aqcg2z.fsf@protonmail.com> (message from Pip Cet on Thu, 13 Feb 2025 10:08:54 +0000) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <877c5vf730.fsf@protonmail.com> <86r043j77n.fsf@gnu.org> <87ed02ewnl.fsf@protonmail.com> <86lduajsdi.fsf@gnu.org> <87a5aqcg2z.fsf@protonmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -3.3 (---) > Date: Thu, 13 Feb 2025 10:08:54 +0000 > From: Pip Cet > Cc: stefankangas@gmail.com, mattias.engdegard@gmail.com, 70988@debbugs.gnu.org, monnier@iro.umontreal.ca > > "Eli Zaretskii" writes: [...] This style of "discussion" leads nowhere useful, so I'm bowing out of it. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 09:08:19 2025 Received: (at 70988) by debbugs.gnu.org; 13 Feb 2025 14:08:19 +0000 Received: from localhost ([127.0.0.1]:41467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tiZt5-0004Ef-8g for submit@debbugs.gnu.org; Thu, 13 Feb 2025 09:08:19 -0500 Received: from mail-10631.protonmail.ch ([79.135.106.31]:47161) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tiZt3-0004ER-F3 for 70988@debbugs.gnu.org; Thu, 13 Feb 2025 09:08:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1739455688; x=1739714888; bh=RKSUuYsQwaDaZEnjyVw1itfXnNap7ImlvE2e40ehg0Q=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=EqwjkRWWJixKuCb8yBXuQDSagVc0Qwe2gFY8I+rI+O9Ls/4a4p+o8J8hKmCGN7lNi KVPgJ0Wg4TeMObTUK2zoszUJWxZmZyV9UGnWRAolgWvUC9v5wEsbixZVoxm15yZJ0d jTQmgz/Ixa6qrRQIxZZCv4tZHiYPFCh3dAdK+f3zZ+n4p0IAZvyao9vC/wcELNvLbE RQsoUoVUttHie0Jdlvw6x8R5xU9pi/piuqmHXpNwP9W2hd+fU4Ak6QsSMpQUX9lbpg iE2dchrihD+JQNYoUgjXYmCfv0a0Tz6hbJeBZzjfhPcL+YJ3Uk4cImBDdn+5vlD727 Cp25mVmvwwXXg== Date: Thu, 13 Feb 2025 14:08:02 +0000 To: Stefan Kangas From: Pip Cet Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] Message-ID: <87h64yrl9a.fsf@protonmail.com> In-Reply-To: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 5859837e0ca61a25895985addd2d89ec7bc97378 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= , Eli Zaretskii , monnier@iro.umontreal.ca 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: -1.0 (-) "Stefan Kangas" writes: > Mattias Engdeg=C3=A5rd writes: > >> After looking further into the Lisp reader/printer I found two more >> silent Latin-1 assumptions. In all three cases, I firmly believe the >> following to be true: >> >> * The behaviour is not intended but just code accidents. >> * They should hardly affect any user code at all. >> * They are nevertheless clear bugs which should be fixed. >> >> Further on this will have to wait until after Emacs 30 has been branched= to avoid delaying that more important task. > > FWIW, the proposed patch looks like a bug fix to me as well, so I think > we should install it. Here's a patch which avoids a few crashes in lread.c. If we change the behavior of readcharfuns' return values to always be treated as multibyte, but fail to verify that its return value satisfies CHARACTERP, as proposed, further problems will arise. In the event that there is interest in fixing Emacs not to crash in these circumstances, let me know and I can commit this. Pip >From e9d48abeb199db7d76386639adadba5c7e45177c Mon Sep 17 00:00:00 2001 From: Pip Cet Subject: [PATCH] Avoid crashes in lread.c when invalid characters are read * src/lread.c (readchar): Don't crash for non-fixnum return values. (read_filtered_event): Don't crash for invalid symbol properties. (Fread_char): (Fread_char_exclusive): (character_name_to_code): Check 'FIXNUMP' before using 'XFIXNUM'. (read_char_escape): Use 'invalid_syntax' rather than crashing for invalid characters. --- src/lread.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lread.c b/src/lread.c index 6af95873bb8..5875b489c97 100644 --- a/src/lread.c +++ b/src/lread.c @@ -398,7 +398,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte) =20 tem =3D call0 (readcharfun); =20 - if (NILP (tem)) + if (!FIXNUMP (tem)) return -1; return XFIXNUM (tem); =20 @@ -816,7 +816,7 @@ read_filtered_event (bool no_switch_frame, bool ascii_r= equired, =09 tem1 =3D Fget (Fcar (tem), Qascii_character); =09 /* Merge this symbol's modifier bits =09=09 with the ASCII equivalent of its basic code. */ -=09 if (!NILP (tem1)) +=09 if (FIXNUMP (tem1) && FIXNUMP (Fcar (Fcdr (tem)))) =09=09XSETFASTINT (val, XFIXNUM (tem1) | XFIXNUM (Fcar (Fcdr (tem)))); =09 } =09} @@ -898,7 +898,7 @@ DEFUN ("read-char", Fread_char, Sread_char, 0, 3, 0, } val =3D read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), sec= onds); =20 - return (NILP (val) ? Qnil + return (!FIXNUMP (val) ? Qnil =09 : make_fixnum (char_resolve_modifier_mask (XFIXNUM (val)))); } =20 @@ -976,7 +976,7 @@ DEFUN ("read-char-exclusive", Fread_char_exclusive, Sre= ad_char_exclusive, 0, 3, =20 val =3D read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), sec= onds); =20 - return (NILP (val) ? Qnil + return (!FIXNUMP (val) ? Qnil =09 : make_fixnum (char_resolve_modifier_mask (XFIXNUM (val)))); } =20 @@ -2820,7 +2820,7 @@ character_name_to_code (char const *name, ptrdiff_t n= ame_len, invalid_syntax_lisp (CALLN (Fformat, format, namestr), readcharfun); } =20 - return XFIXNUM (code); + return FIXNUMP (code) ? XFIXNUM (code) : -1; } =20 /* Bound on the length of a Unicode character name. As of @@ -3058,7 +3058,8 @@ read_char_escape (Lisp_Object readcharfun, int next_c= har) chr =3D c; break; } - eassert (chr >=3D 0 && chr < (1 << CHARACTERBITS)); + if (chr < 0 || chr > (1 << CHARACTERBITS)) + invalid_syntax ("Invalid character", readcharfun); =20 /* Apply Control modifiers, using the rules: \C-X =3D ascii_ctrl(nomod(X)) | mods(X) if nomod(X) is one of: --=20 2.48.1 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 11:42:34 2025 Received: (at 70988) by debbugs.gnu.org; 13 Feb 2025 16:42:34 +0000 Received: from localhost ([127.0.0.1]:45197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ticIM-0003sT-Ch for submit@debbugs.gnu.org; Thu, 13 Feb 2025 11:42:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48760) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ticIJ-0003s5-CB for 70988@debbugs.gnu.org; Thu, 13 Feb 2025 11:42:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ticID-00040h-4D; Thu, 13 Feb 2025 11:42:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=rOFbBewu1EkXKQxsbVSeC0Umtiz91hTrcKChkosX1y0=; b=qAHikRY3N0iuz8X9cq0W 2Y89acTq3Tu223M7QAxi9A6usybWdAIXfrUVd6Y1FFvI3DJvtPB8MHikzsOjyIr5/w8XDo/3CUckR 4gVkqVA0BNCX00URV9vuA48LJD/WEbVqPLyaydD3lkj/Ym65KK8HhrNdwcBACMfkGGRu0CWXiico7 o9YDlWQAf9/Aar7zE9fcj4jSar6Jloqju9XHwMCMUB9wb3ZH6wc7uxugQ7uyVIC/sWnECZ/SO/+Lr 2om4GxVZJ4q1gEUuX0fpXlkzoHoDpqcTrj4UwYPLrZIdgkoEwOJoD66yujO1mMeNMBOc4xNjA92xq ukebOGvXvLyl6g==; Date: Thu, 13 Feb 2025 18:42:13 +0200 Message-Id: <86v7tdhk4a.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-Reply-To: <87h64yrl9a.fsf@protonmail.com> (message from Pip Cet on Thu, 13 Feb 2025 14:08:02 +0000) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <87h64yrl9a.fsf@protonmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -3.3 (---) > Date: Thu, 13 Feb 2025 14:08:02 +0000 > From: Pip Cet > Cc: Mattias Engdegård , 70988@debbugs.gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca > > @@ -3058,7 +3058,8 @@ read_char_escape (Lisp_Object readcharfun, int next_char) > chr = c; > break; > } > - eassert (chr >= 0 && chr < (1 << CHARACTERBITS)); > + if (chr < 0 || chr > (1 << CHARACTERBITS)) > + invalid_syntax ("Invalid character", readcharfun); Please leave the assertion in place here (in addition to the error message), since an abort is easier to spot than an error message, especially if someone catches errors at a higher level. I'm okay with the rest of this patch, thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 12:11:52 2025 Received: (at 70988) by debbugs.gnu.org; 13 Feb 2025 17:11:52 +0000 Received: from localhost ([127.0.0.1]:45280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ticki-0008G2-3E for submit@debbugs.gnu.org; Thu, 13 Feb 2025 12:11:52 -0500 Received: from mail-10628.protonmail.ch ([79.135.106.28]:17609) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tickf-0008Fl-0k for 70988@debbugs.gnu.org; Thu, 13 Feb 2025 12:11:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1739466701; x=1739725901; bh=jia/01212FZVcKMDxo8hdSN7ZJPevD15BiI6rxAZer0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=f8nxX64qllloelkWOcw7bdKQ26dCWwZ1yOCexRNPQS7jYBHCW1h7qKc+QCSFbRn7I LwIRw3hWvuI+mLfDGXZ/p7SEYBE1D5rOmVMqZiX9B+x4o22MHuDJhfMhXQ/91Re0fX itr6eWd50PZ+Eh4edrlWrGQEWZWcca8TTh5+CFmx3IWCiwaLfV69ar7UF7/R5gaDys 3FCMQ+f/IZe62t7h5ORO1eIYo3Qj0SzK8BKB7of4IK/HOB0LnNuuMZMtX0VxwWmJLC Tlif8zg2nSLpf5v4hSofV1xr+SQg1Amw3XggxBRZJTqxcw0ksCvC/p1tHDzPOJ6QXI 7gUkl7aiULjxw== Date: Thu, 13 Feb 2025 17:11:35 +0000 To: Eli Zaretskii From: Pip Cet Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] Message-ID: <87ldu9rcre.fsf@protonmail.com> In-Reply-To: <86v7tdhk4a.fsf@gnu.org> References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <87h64yrl9a.fsf@protonmail.com> <86v7tdhk4a.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: c87cf43931c355a87f5eaba528ee5d545cd9840d MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -1.0 (-) "Eli Zaretskii" writes: >> Date: Thu, 13 Feb 2025 14:08:02 +0000 >> From: Pip Cet >> Cc: Mattias Engdeg=C3=A5rd , 70988@debbugs.= gnu.org, Eli Zaretskii , monnier@iro.umontreal.ca >> >> @@ -3058,7 +3058,8 @@ read_char_escape (Lisp_Object readcharfun, int nex= t_char) >> chr =3D c; >> break; >> } >> - eassert (chr >=3D 0 && chr < (1 << CHARACTERBITS)); >> + if (chr < 0 || chr > (1 << CHARACTERBITS)) >> + invalid_syntax ("Invalid character", readcharfun); > > Please leave the assertion in place here (in addition to the error > message), since an abort is easier to spot than an error message, > especially if someone catches errors at a higher level. Just to clarify, you want @@ -3058,7 +3058,8 @@ read_char_escape (Lisp_Object readcharfun, int next_c= har) chr =3D c; break; } eassert (chr >=3D 0 && chr < (1 << CHARACTERBITS)); + if (chr < 0 || chr >=3D (1 << CHARACTERBITS)) + invalid_syntax ("Invalid character", readcharfun); ? Thanks! Pip From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 13 15:13:17 2025 Received: (at 70988) by debbugs.gnu.org; 13 Feb 2025 20:13:17 +0000 Received: from localhost ([127.0.0.1]:45594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tifaG-0007oY-KO for submit@debbugs.gnu.org; Thu, 13 Feb 2025 15:13:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41392) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tifaE-0007oK-0w for 70988@debbugs.gnu.org; Thu, 13 Feb 2025 15:13:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tifa7-0003uA-H9; Thu, 13 Feb 2025 15:13:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=C4q4fcz0xay00fBakYzBNXVoRKzmL20/Uhg13SzErl0=; b=T3IM26KVbEPP rvPsNnCAosgk+LwTLbE0wt9XVJl3Do2H7iQFCd6bs2hy/uon0DnmSltC/mpTdan/ii5tz6Bsx2d8D Q7AVSh9+zCso/3iXeZm104xPFe3i8pOKxIWhkKnbEiVDAb+AMOoHNkGuRD4z3ycl1pNH7Qy7oc6Q9 z0erivFG4FRS+3UCl7B/5AZROYqlVh6V3OCz3nQqsMla3IBl4dEjcsJoKIpKY5mNzLCwGnM8c6Bw1 CfpN6+NiihQ60gS7Ic/UggCPE1tzOVC/VIzQ5kMR2yfTCgMbiqmgRt3gdW6l3oAfin+i7f+LMsmTt C2fTGzI64BvwkAGofDmjcQ==; Date: Thu, 13 Feb 2025 22:13:04 +0200 Message-Id: <86ldu9hacv.fsf@gnu.org> From: Eli Zaretskii To: Pip Cet In-Reply-To: <87ldu9rcre.fsf@protonmail.com> (message from Pip Cet on Thu, 13 Feb 2025 17:11:35 +0000) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> <87h64yrl9a.fsf@protonmail.com> <86v7tdhk4a.fsf@gnu.org> <87ldu9rcre.fsf@protonmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, mattias.engdegard@gmail.com, stefankangas@gmail.com, monnier@iro.umontreal.ca 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: -3.3 (---) > Date: Thu, 13 Feb 2025 17:11:35 +0000 > From: Pip Cet > Cc: stefankangas@gmail.com, mattias.engdegard@gmail.com, 70988@debbugs.gnu.org, monnier@iro.umontreal.ca > > "Eli Zaretskii" writes: > > > Please leave the assertion in place here (in addition to the error > > message), since an abort is easier to spot than an error message, > > especially if someone catches errors at a higher level. > > Just to clarify, you want > > @@ -3058,7 +3058,8 @@ read_char_escape (Lisp_Object readcharfun, int next_char) > chr = c; > break; > } > eassert (chr >= 0 && chr < (1 << CHARACTERBITS)); > + if (chr < 0 || chr >= (1 << CHARACTERBITS)) > + invalid_syntax ("Invalid character", readcharfun); > > ? Yes, exactly. Apologies for not making that clear. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 05 07:27:39 2025 Received: (at 70988) by debbugs.gnu.org; 5 Jul 2025 11:27:40 +0000 Received: from localhost ([127.0.0.1]:42073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uY13T-0003hs-35 for submit@debbugs.gnu.org; Sat, 05 Jul 2025 07:27:39 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:43086) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uY13P-0003h5-GV for 70988@debbugs.gnu.org; Sat, 05 Jul 2025 07:27:36 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-553b9eb2299so2323409e87.0 for <70988@debbugs.gnu.org>; Sat, 05 Jul 2025 04:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751714849; x=1752319649; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=3qpqomV0VUL8MsFGU3q6Z7TneNKotNUIbbxzAfL+u28=; b=MnG56Iy1V+H8mqepBIvRnago9RUQHIFi10C2af5gttSRPJgLrypCApeyWN75w1goox Qy2uUCmh5l+10yzvEWbRCrHYaBLG1E4lACWqIp19O/R6npt3N8PrFJtGtw1fncKCHDhT ZWJJUXSxsUGVfM/dwxRVpSs1O9ad52d31gSLeSLgLGQSH/CoDyT0rY7bBk+5ya25ZHdd wsP+dPu0ccmmygR6Ewkv3ZIFK/D7iyVYmITuRjDUyVPCf1D144G8ECvknduTLxnVtoi6 SkAzfPmuUImejAccFs3AUNbpT1Png5SnVOVADnl6RPxfGSxdewUV/3XJ2HeUKEmM6yeC ECyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751714849; x=1752319649; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3qpqomV0VUL8MsFGU3q6Z7TneNKotNUIbbxzAfL+u28=; b=FuKxqz8r5ufkSMMYWyoyOwB0l7X1mORoyK072H16vLKMh6WywaKBqIzkdNPh4V5ahj ArF/nx8vIZ+n221FjstoLCxQkWPJxE0LVwRv3e8mx8IIZpxNfIAcdwJ3k6Ov2Vpd/W3c Zu0Ax8L0pIJf2yc1PWWYxgVKvfQDdTXg+nn7PX7wMX/TBqvThpvcmkop/CNsZMGVmB9H SnZ3oVP/tD+68qHlCuDqwd+meXNGBuDj8aBeBo2N8AdhMvuVUBfvb+P0CBiyysRGu256 yNo1uqFmibJ9U4O8YmevOAE5P4h38b8JaD+wbTAkAZU4NE7TYuHgZ6PTDudyuvQq2LAz hc+Q== X-Gm-Message-State: AOJu0Yy1tJqh32AFVZ7tQ/fQ/8D0eCzm+XSm93IZ4mOJ7jxci57bnNFD W34xIabSSSXI31ztBUgjQUj3VVMx+tGtkpS5IzPbB77LQ6pBHq63zwH1 X-Gm-Gg: ASbGncvrJ2BZ1ZXONchK1ij8/dFrA5BpxkrDbyvVdmpnCXr1H2bNM9gq/zOfTaUMRwV JDp8Ngn65I4UM/fpLoSBCRYO8Xd8u2QaYn1ZFe97r4l9r8omCR0mYopnnNafw2aCa5nR3L1KZRp fRQtjoPL1rL0Hk2AIaiQBQoZce1IPFhMx68UTQQdHYMnxQkkzJVgKbOX0W+je+v6EZOTzsMkzcu p6fjOfkGopjJHQuRQQwLCkHINIeGqCMaCZJ1JfpeXwG7nbhSfx+tu5ZK/41BgNcxprAhxKIGkkd gd13vkTtAM+UixhDS4jmHFAtjEQ761aUXLTuAXCIHuzQ9jE3MgHUuQj0EAPxB+L6R9anHdtrzCV HqjLe1Re2FZqOue3RLJVXBZeSMvEv5mVKJ8H4kBu5ZsszHfM47nHH X-Google-Smtp-Source: AGHT+IEyzfOAy/RCbxCeegIrgtG2K1e4NZpJaKptco8fbrmkW8U2W3+BxA7Y4RG+TJvwlUWt40Skew== X-Received: by 2002:a05:6512:400a:b0:553:cb0b:4dd8 with SMTP id 2adb3069b0e04-556584018e5mr1974430e87.6.1751714848519; Sat, 05 Jul 2025 04:27:28 -0700 (PDT) Received: from smtpclient.apple (c188-150-186-155.bredband.tele2.se. [188.150.186.155]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-556383bb157sm558236e87.13.2025.07.05.04.27.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2025 04:27:27 -0700 (PDT) From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_683F2C0F-8682-4944-B2D1-777F16AA240A" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] Date: Sat, 5 Jul 2025 13:27:26 +0200 In-Reply-To: To: Eli Zaretskii References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, Pip Cet , Stefan Monnier 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: -1.0 (-) --Apple-Mail=_683F2C0F-8682-4944-B2D1-777F16AA240A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Sorry about the delay. The bugs I was talking about earlier are: 1. (read FUNCTION) assumes latin-1, as discussed earlier in this bug. The code in readchar() just forgets to set the multibyte flag for = function sources. 2. (read UNIBYTE-STRING) assumes latin-1: (read "\"a\xff\"") -> "a=C3=BF" For buffer and marker sources, readchar() does if (! ASCII_CHAR_P (c)) c =3D BYTE8_TO_CHAR (c); but this is missing for string sources. 3. (print UNIBYTE-SYM) assumes latin-1; (prin1-to-string (make-symbol "a\xff")) -> "a=C3=BF" Here the reason is that print_object() calls = `fetch_string_char_advance` instead of = `fetch_string_char_as_multibyte_advance`. The above three bugs are clear omissions and were never intended = behaviour; a lot happened in the switch to multibyte and bugs were bound = to appear in the cracks. There should be no downside from fixing them. We may want to ask ourselves whether it's reasonable that read sources = have a multibyteness, which affects how symbols are read but not string = literals. I don't think it should affect either. However, I'm leaving = this concern out of the immediate discussion. I also have a patch that improves reader performance while cleaning up = some parts of the code, but it can be applied before or after fixing the = three bugs above. --Apple-Mail=_683F2C0F-8682-4944-B2D1-777F16AA240A Content-Disposition: attachment; filename=0001-Read-characters-from-functions-as-multibyte.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Read-characters-from-functions-as-multibyte.patch" Content-Transfer-Encoding: quoted-printable =46rom=205faa6336ac0426dd2a2d7fb26793635d4a834c29=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sat,=205=20Jul=202025=2013:09:43=20+0200=0A= Subject:=20[PATCH=201/3]=20Read=20characters=20from=20functions=20as=20= multibyte=0A=0APreviously,=20latin-1=20was=20incorrectly=20assumed=20= (bug#70988).=0A=0A*=20src/lread.c=20(readchar):=20Set=20multibyte=20= flag.=0A*=20test/src/lread-tests.el=20(lread-function-source):=20New=20= test.=0A---=0A=20src/lread.c=20=20=20=20=20=20=20=20=20=20=20=20=20|=203=20= +++=0A=20test/src/lread-tests.el=20|=205=20+++++=0A=202=20files=20= changed,=208=20insertions(+)=0A=0Adiff=20--git=20a/src/lread.c=20= b/src/lread.c=0Aindex=2040eb6ad7875..6cd6735a215=20100644=0A---=20= a/src/lread.c=0A+++=20b/src/lread.c=0A@@=20-396,6=20+396,9=20@@=20= readchar=20(Lisp_Object=20readcharfun,=20bool=20*multibyte)=0A=20=20=20=20= =20=20=20goto=20read_multibyte;=0A=20=20=20=20=20}=0A=20=0A+=20=20if=20= (multibyte)=0A+=20=20=20=20*multibyte=20=3D=201;=0A+=0A=20=20=20tem=20=3D=20= call0=20(readcharfun);=0A=20=0A=20=20=20if=20(!FIXNUMP=20(tem))=0Adiff=20= --git=20a/test/src/lread-tests.el=20b/test/src/lread-tests.el=0Aindex=20= 40640e79eed..d832cc9aa4e=20100644=0A---=20a/test/src/lread-tests.el=0A= +++=20b/test/src/lread-tests.el=0A@@=20-387,4=20+387,9=20@@=20= lread-skip-to-eof=0A=20=20=20=20=20(goto-char=20(point-min))=0A=20=20=20=20= =20(should-error=20(read=20(current-buffer))=20:type=20'end-of-file)))=0A= =20=0A+(ert-deftest=20lread-function-source=20()=0A+=20=20(let*=20((s=20= '(#x41=20#x222a=20#xff=20-1))=0A+=20=20=20=20=20=20=20=20=20(val=20(read=20= (lambda=20()=20(pop=20s)))))=0A+=20=20=20=20(should=20(equal=20= (symbol-name=20val)=20"A=E2=88=AA=C3=BF"))))=0A+=0A=20;;;=20= lread-tests.el=20ends=20here=0A--=20=0A2.32.0=20(Apple=20Git-132)=0A=0A= --Apple-Mail=_683F2C0F-8682-4944-B2D1-777F16AA240A Content-Disposition: attachment; filename=0002-Print-non-ASCII-chars-in-unibyte-symbols-as-raw-byte.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-Print-non-ASCII-chars-in-unibyte-symbols-as-raw-byte.patch" Content-Transfer-Encoding: quoted-printable =46rom=204131108fc3c7080046002eb720516d9cbac9b346=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=2018=20Jul=202024=2016:16:53=20+0200=0A= Subject:=20[PATCH=202/3]=20Print=20non-ASCII=20chars=20in=20unibyte=20= symbols=20as=20raw=20bytes=0A=0APreviously,=20latin-1=20was=20= incorrectly=20assumed=20(bug#70988).=0A=0A*=20src/print.c=20= (print_object):=20Call=20the=20correct=20function.=0A*=20= test/src/print-tests.el=20(print-unibyte-symbols):=20New=20test.=0A---=0A= =20src/print.c=20=20=20=20=20=20=20=20=20=20=20=20=20|=202=20+-=0A=20= test/src/print-tests.el=20|=207=20+++++++=0A=202=20files=20changed,=208=20= insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20a/src/print.c=20= b/src/print.c=0Aindex=20138a21f18ab..c14e6e1419e=20100644=0A---=20= a/src/print.c=0A+++=20b/src/print.c=0A@@=20-2475,7=20+2475,7=20@@=20= print_object=20(Lisp_Object=20obj,=20Lisp_Object=20printcharfun,=20bool=20= escapeflag)=0A=20=09=20=20{=0A=20=09=20=20=20=20/*=20Here,=20we=20must=20= convert=20each=20multi-byte=20form=20to=20the=0A=20=09=20=20=20=20=20=20=20= corresponding=20character=20code=20before=20handing=20it=20to=20= PRINTCHAR.=20=20*/=0A-=09=20=20=20=20int=20c=20=3D=20= fetch_string_char_advance=20(name,=20&i,=20&i_byte);=0A+=09=20=20=20=20= int=20c=20=3D=20fetch_string_char_as_multibyte_advance=20(name,=20&i,=20= &i_byte);=0A=20=09=20=20=20=20maybe_quit=20();=0A=20=0A=20=09=20=20=20=20= if=20(escapeflag)=0Adiff=20--git=20a/test/src/print-tests.el=20= b/test/src/print-tests.el=0Aindex=20ce8c095d496..c870427a0a9=20100644=0A= ---=20a/test/src/print-tests.el=0A+++=20b/test/src/print-tests.el=0A@@=20= -560,5=20+560,12=20@@=20test-print-number-realloc=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(ignore=20(make-string=20100=20?b))))=0A=20=20=20=20= =20(should=20(equal=20outstr=20"xxx"))))=0A=20=0A+(ert-deftest=20= print-unibyte-symbols=20()=0A+=20=20;;=20Non-ASCII=20in=20unibyte=20= symbols=20should=20print=20as=20raw=20bytes.=0A+=20=20(should=20(equal=20= (prin1-to-string=20(make-symbol=20"a\xff"))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(string-to-multibyte=20"a\xff")))=0A+=20=20= (should=20(equal=20(prin1-to-string=20(make-symbol=20"th\303\251"))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(string-to-multibyte=20= "th\303\251"))))=0A+=0A=20(provide=20'print-tests)=0A=20;;;=20= print-tests.el=20ends=20here=0A--=20=0A2.32.0=20(Apple=20Git-132)=0A=0A= --Apple-Mail=_683F2C0F-8682-4944-B2D1-777F16AA240A Content-Disposition: attachment; filename=0003-Read-non-ASCII-chars-from-unibyte-string-sources-as-.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-Read-non-ASCII-chars-from-unibyte-string-sources-as-.patch" Content-Transfer-Encoding: quoted-printable =46rom=20769b85162630e44a6bb1c49a216dc732f162747a=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sat,=205=20Jul=202025=2013:20:18=20+0200=0A= Subject:=20[PATCH=203/3]=20Read=20non-ASCII=20chars=20from=20unibyte=20= string=20sources=20as=20raw=0A=20bytes=0A=0APreviously,=20latin-1=20was=20= incorrectly=20assumed=20(bug#70988).=0A---=0A=20src/lread.c=20=20=20=20=20= =20=20=20=20=20=20=20=20|=202=20++=0A=20test/src/lread-tests.el=20|=206=20= ++++++=0A=202=20files=20changed,=208=20insertions(+)=0A=0Adiff=20--git=20= a/src/lread.c=20b/src/lread.c=0Aindex=206cd6735a215..5d9bdb065e8=20= 100644=0A---=20a/src/lread.c=0A+++=20b/src/lread.c=0A@@=20-382,6=20= +382,8=20@@=20readchar=20(Lisp_Object=20readcharfun,=20bool=20= *multibyte)=0A=20=20=20=20=20=20=20else=0A=20=09{=0A=20=09=20=20c=20=3D=20= SREF=20(readcharfun,=20read_from_string_index_byte);=0A+=09=20=20if=20= (!ASCII_CHAR_P=20(c))=0A+=09=20=20=20=20c=20=3D=20BYTE8_TO_CHAR=20(c);=0A= =20=09=20=20read_from_string_index++;=0A=20=09=20=20= read_from_string_index_byte++;=0A=20=09}=0Adiff=20--git=20= a/test/src/lread-tests.el=20b/test/src/lread-tests.el=0Aindex=20= d832cc9aa4e..d9b31a6c438=20100644=0A---=20a/test/src/lread-tests.el=0A= +++=20b/test/src/lread-tests.el=0A@@=20-392,4=20+392,10=20@@=20= lread-function-source=0A=20=20=20=20=20=20=20=20=20=20(val=20(read=20= (lambda=20()=20(pop=20s)))))=0A=20=20=20=20=20(should=20(equal=20= (symbol-name=20val)=20"A=E2=88=AA=C3=BF"))))=0A=20=0A+(ert-deftest=20= lread-unibyte-string-source=20()=0A+=20=20(let*=20((src=20"\"a\xff\"")=0A= +=20=20=20=20=20=20=20=20=20(val=20(read=20src)))=0A+=20=20=20=20(should=20= (equal=20val=20"a\xff"))=20=20=20=20=20=20=20=20;=20not=20"a=C3=BF"=0A+=20= =20=20=20(should-not=20(multibyte-string-p=20val))))=0A+=0A=20;;;=20= lread-tests.el=20ends=20here=0A--=20=0A2.32.0=20(Apple=20Git-132)=0A=0A= --Apple-Mail=_683F2C0F-8682-4944-B2D1-777F16AA240A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_683F2C0F-8682-4944-B2D1-777F16AA240A-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 05 11:05:14 2025 Received: (at 70988) by debbugs.gnu.org; 5 Jul 2025 15:05:14 +0000 Received: from localhost ([127.0.0.1]:46087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uY4S0-0005tf-M0 for submit@debbugs.gnu.org; Sat, 05 Jul 2025 11:05:13 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54720) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uY4Ry-0005oA-92 for 70988@debbugs.gnu.org; Sat, 05 Jul 2025 11:05:10 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C39E8441470; Sat, 5 Jul 2025 11:05:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1751727903; bh=FWko2J/oEpKqDEGhHLSf1WfmB8HKt5Kt03IHLJJgmhU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ZCIqGPBC2V6iEa2itjvCVcvFWAcMQiUn58J3C0eDOKLImUirXCUzBDw8DB9evAiL3 YMDM6NNpoCliLXlTEyY4aAqfr4ZtxcXNOKxVJRU1rMhOFl2XyZ9IxBd+huxfc2ChMo pq2dcm8TWtMwyW3+WHwG7jrCqBGZtxgpjsw05YxIsfctszZtI77RZhiCzXKJORPhWB j8d2lALQ9SUNVYJl1Z2ofKziYQeWAoURxKxpx2mXwQg+2T93C/EoJxUiltj2IpynLU 2UPzFeeehER8Hm7yM6awFaVhBqhBbxArBTUc5qj6CTpWj786Ppom/91N7QilnjZHY8 H69sJ4vXGOmzQ== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 73D8844150D; Sat, 5 Jul 2025 11:05:03 -0400 (EDT) Received: from alfajor (unknown [104.247.225.139]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3B381120225; Sat, 5 Jul 2025 11:05:03 -0400 (EDT) From: Stefan Monnier To: Mattias =?windows-1252?Q?Engdeg=E5rd?= Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] In-Reply-To: Message-ID: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> Date: Sat, 05 Jul 2025 11:05:02 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.280 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, Eli Zaretskii , Pip Cet 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: -3.1 (---) > The above three bugs are clear omissions and were never intended > behaviour; a lot happened in the switch to multibyte and bugs were > bound to appear in the cracks. There should be no downside from > fixing them. The three patches look good to me (thanks especially for the tests). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 07 12:25:24 2025 Received: (at 70988) by debbugs.gnu.org; 7 Jul 2025 16:25:24 +0000 Received: from localhost ([127.0.0.1]:37252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uYoei-0005g8-4M for submit@debbugs.gnu.org; Mon, 07 Jul 2025 12:25:24 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:50339) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uYoeg-0005ab-5O for 70988@debbugs.gnu.org; Mon, 07 Jul 2025 12:25:22 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-5561c20e2d5so3791180e87.0 for <70988@debbugs.gnu.org>; Mon, 07 Jul 2025 09:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751905516; x=1752510316; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=S2S5MxTOW7OAd33zXDuThCEwm3pfNT+HQ3qmuXcZdcU=; b=Fj8FKwxnQbK3kPvVcnFAiPOVL0uVkjfKpngSAvzyv/StpjVjSo0JQvH7zxIatfGSaa FrXJjl1qYyrT//UXYTjkk9vBIy5HJAlMrTbEjg99cg+1gpS5yaoTjcpOBFfYt4UeKPCs IqtBXMA8YVJkdc0GbE2DRRhCVt2MD3obzvOupTNdpVoKZwXhTCNywIIRFIQwtwWGYgMA 3r9CSCNEVCbOWV/vcmRvYUQERWSBXjtG1T4PggUup3MyVB3snN0ZDZGzHrqUCtvSQOjZ ZO+BXNTUsJCik10py8i785YepJgq+aK7koOBhNnO72a5A/w8t9/oVe1KfekgSa2qvopz KORA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751905516; x=1752510316; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=S2S5MxTOW7OAd33zXDuThCEwm3pfNT+HQ3qmuXcZdcU=; b=SoRtGAUn3PwmStJEUszf+ynKJL75XY10EnoopYlkJjtU3I/CvX+pjLVR7ICMVey/LE XFetgs2yWLCqv3oO0qnmrl3+nVwZfDlEsnft7kto+uhOFL3t0Af1mDHy+ErNn/PZ0MIW PF7I/pWjm/Yxo+rL3Nbpqe5/2QxtS/fskQnQh+Lf8jI1Aq1pGW9RhynZFW5oZiLexy4S UBNUjpq9JF5dAWYMl8ARF9qGwjrQk9GQMuM+WlS75F1dvbUH349bQAphUowEpbMmpfhu AZh7UjEwoxwLcyhISo3E9N0SATN6PkdpXxp/u4QnKwr71UmFQmM+55wqqEd/ssuz1B3d uQrw== X-Forwarded-Encrypted: i=1; AJvYcCWDhqz1A2t8nF5qsOwryOooodktK7RjAALUbjMPzX8pYh8n1iEWSqJuspM6iZD7Okm8DIo0Lw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyQ4AVpl8evdqErmqpO67j04DCh9kZS94Gx2ejF+ZJ4EaBVTb+t qkR7oiutt7gPRN1CXioBXcexBMjQ2ZVSo3ySZyXH8iGWXa/FgklfJgpp X-Gm-Gg: ASbGnctbyeRO3nAQZZdkZd+rcCBA8s6CkiWi4lGo5DC8DqLthIX4vqFjku28Go7uj73 6Q1KgLRnOhQvwqgRpPZioGAp7X2N3oUS7NQcmqvRF5MvBva4cu5fTTdyercwT4KrmLpBbpZovji P3t3oDX1kOyE7keKHOQi9oIrXTiJ7XyR/CHC1n52AlnnZEHVCroUbQ3+dL2JxcFJKCsMpjTxYd9 nvbKo/kvV55ARu/g3I7NQySOhgWkIz/KYe0H92IZConJ41LXS8SWGq+2yEYNiCkK60AY/oSrb99 68T4/+Qc4y/XX5Y/vXFzz5iob8MpQ+fBxryNkDKBT7XNffrPOee6rnqU839WLHEZYeylLaczKjy mp0U3qC3igiYrM7s73YN3dfxt1GZJZxiq1VWG2ZLl45quqyxkpdfM X-Google-Smtp-Source: AGHT+IHL3enQ123xJpWn7SYq2pv6GfxD1rca0cWq3xJ2HdmWPbRYa+UXpZQGcEldu2PipVOlZlkcWQ== X-Received: by 2002:a05:6512:6d5:b0:553:279b:c55d with SMTP id 2adb3069b0e04-557e55b9f07mr2512059e87.45.1751905515220; Mon, 07 Jul 2025 09:25:15 -0700 (PDT) Received: from smtpclient.apple (c188-150-186-155.bredband.tele2.se. [188.150.186.155]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-556383bb14bsm1382037e87.16.2025.07.07.09.25.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jul 2025 09:25:14 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 7 Jul 2025 18:25:13 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> To: Stefan Monnier X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988 Cc: 70988@debbugs.gnu.org, Eli Zaretskii , Pip Cet 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: -1.0 (-) 5 juli 2025 kl. 17.05 skrev Stefan Monnier : > The three patches look good to me (thanks especially for the tests). Thank you, pushed to master. The speed-up patch mentioned earlier will = be applied shortly as well. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 10 05:11:56 2025 Received: (at 70988-done) by debbugs.gnu.org; 10 Jul 2025 09:11:56 +0000 Received: from localhost ([127.0.0.1]:55722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uZnJr-0002zR-Uu for submit@debbugs.gnu.org; Thu, 10 Jul 2025 05:11:56 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:59536) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uZnJo-0002xh-6p for 70988-done@debbugs.gnu.org; Thu, 10 Jul 2025 05:11:53 -0400 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-32b553e33e6so5349861fa.2 for <70988-done@debbugs.gnu.org>; Thu, 10 Jul 2025 02:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752138705; x=1752743505; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=Z0MKhjeL0uEjwRdzEhzGKAAss5pnN8aVJE3zc9AYZk4=; b=iLj0R4XZPA1hO0rm/LAikDBaagCa7DuE6q0+/0ZadJwBaYKq7KltRq3mIC9OcVyT+e GSBhmMTNqhF8cXXxyCTM5uevXuD/zkC+W1D//CerVryIhS/uy80iZAP0HP//6GVZUk+b WTBO0XC5Tgj6vJKDlBgskDT5Y48a+jWjoJ0InUR1k88nmP7KCiS5eup3a1YS7dSin7pf Yhzz173rP8uds613lRhrvzoKoqB31htJbvFN2I73waq2vIHNzUbCoz8lVv6YKJ7KLb7C a61iWYf3HQc91/CgaxznvH7OylBN8HPq3mG7oERMu14O5KKR+ehSJYKUtTDOltHJwAHl Savg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752138705; x=1752743505; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Z0MKhjeL0uEjwRdzEhzGKAAss5pnN8aVJE3zc9AYZk4=; b=CrTxpJPw0gEiOlLoMgeK3wEc+9NLBq7cMj+8Z8GpuInmsqnsBwEzuMGijHi6FsFrb2 uFd1KVG/VuRKPhW0BX6bHNTWOksUzxxGYt/k2q1uYSbAouXNTaNmVRYY1FIUVQ2OVdO1 hWJqGU0loMeBngH00eT1V3mydZA8VgnPTptlmkMcJgwmblEbWoiXk+fLb6CFtgOzGGsb +RV0VF/m6ZkuXdHRhFe311Imisa3aRwFFmZm/+AMmAPPjLsNirx9vYroV5H/sbiu6Oj+ 5cRNlQJXuchtWPtPH6AKuenXjklkCON7XvrOX+X7IiPSVDlBmz2HRnDW57fFDpeEQ/OJ tI8A== X-Forwarded-Encrypted: i=1; AJvYcCUQ+Q/K4sp0ol/nE+dXv2Y0sdb1ZWTSjRQyEqQzdkXT4bzVgdClaGzr7oX3NeXG28XoE/FsKqUypGDG@debbugs.gnu.org X-Gm-Message-State: AOJu0YxbcfmjKmLioP7uqIQOCZ51Wzlitzf313jyspZScaHOLaRP6mmx RtyOLTilkruSH39Ceg2JqfhLeALDmVm4CD88z0FpwwoB6zWhoab9tT7I X-Gm-Gg: ASbGncu8P0ZGgyX2GT9xhT1bizn59kDgFB4ARV7hxiRdXW2oQ24kKhwZ505ACqHIC0l Mo9bxnLox4bnkZtFlBPgfBaB831dVaUN5pbtibJbuO61PsrjSfoAZWozyBTer6HkBrturJGXn3Y lMUdoek/nfklQJADc1QHvZRRtIvOQg97tLJOnVSl49lNvEqT3Dt0xMTmf0UHodzK7jQk65sQONW XsOxGZEhWaiz1AKTsqJA9cCMgZj4BKFvBuiTsZkNeb8neXqEwdNxBy++9cbbYN/Zj1tEKsg7t17 4HhePKb8wp0xDiN9La0adk5hBwzHg4tX64ytHeBguQM5CteKzH40oKMnN1KkFWhfosDXYvMQCLP WPgygtHyPm/eYohK20c2Gb6BWuvB2YotyLtL+lHxxqtLEvgxED9P4zL+TScybBnI= X-Google-Smtp-Source: AGHT+IFzwgNnVlmELMhyW5FEvcYw6pPxVWsLvYIWhDYAxnBDNIc0/TL8a2K+YSkLUPHIU9jGNrH6HA== X-Received: by 2002:a2e:a984:0:b0:32b:7ddd:278b with SMTP id 38308e7fff4ca-3304d90b275mr792351fa.40.1752138704765; Thu, 10 Jul 2025 02:11:44 -0700 (PDT) Received: from smtpclient.apple (c188-150-186-155.bredband.tele2.se. [188.150.186.155]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32fa2913852sm2142181fa.16.2025.07.10.02.11.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jul 2025 02:11:44 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Subject: Re: bug#70988: (read FUNCTION) uses Latin-1 [PATCH] From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 10 Jul 2025 11:11:43 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <386D06C7-DFDD-43EC-8F44-4CE6DC2053FB@gmail.com> References: <37B5B5D0-9C0B-4E1C-9F3C-6CA647612E08@gmail.com> <86seyhh9uv.fsf@gnu.org> <86le49h6sm.fsf@gnu.org> <8634qghg2j.fsf@gnu.org> <74B41A66-5B3C-4A09-A5F4-A389464BDA27@gmail.com> To: Stefan Monnier X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70988-done Cc: Eli Zaretskii , 70988-done@debbugs.gnu.org, Pip Cet 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: -1.0 (-) > The speed-up patch mentioned earlier will be applied shortly as well. That patch is now in master too, and while there is more work to be done = in that regard we are long past the scope of this bug which is hereby = closed.