From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#57507: Regular expression matching depends on locale encoding Date: Mon, 05 Sep 2022 21:24:35 +0200 Message-ID: <87czc939qk.fsf@gnu.org> References: <87mtbe5kiz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10991"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) Cc: 57507@debbugs.gnu.org To: Jean Abou Samra Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Sep 05 21:25:12 2022 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVHiZ-0002iC-ON for guile-bugs@m.gmane-mx.org; Mon, 05 Sep 2022 21:25:11 +0200 Original-Received: from localhost ([::1]:56330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVHiY-0007DT-Ol for guile-bugs@m.gmane-mx.org; Mon, 05 Sep 2022 15:25:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVHiQ-0007D1-A9 for bug-guile@gnu.org; Mon, 05 Sep 2022 15:25:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVHiQ-00043c-05 for bug-guile@gnu.org; Mon, 05 Sep 2022 15:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVHiP-00046Z-S5 for bug-guile@gnu.org; Mon, 05 Sep 2022 15:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 05 Sep 2022 19:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57507 X-GNU-PR-Package: guile Original-Received: via spool by 57507-submit@debbugs.gnu.org id=B57507.166240588615748 (code B ref 57507); Mon, 05 Sep 2022 19:25:01 +0000 Original-Received: (at 57507) by debbugs.gnu.org; 5 Sep 2022 19:24:46 +0000 Original-Received: from localhost ([127.0.0.1]:48946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVHi9-00045v-Rr for submit@debbugs.gnu.org; Mon, 05 Sep 2022 15:24:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVHi7-00045f-1p for 57507@debbugs.gnu.org; Mon, 05 Sep 2022 15:24:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVHi1-0003uz-C8; Mon, 05 Sep 2022 15:24:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=RbpwUQgKWzA/hVtVBJHICbWsT/2uZuYTzJLs2NkCGP4=; b=E9u0m6a+043ylH+qVxh0 ZBpwOSKTyKorwD5KBZ5VsaZwPp9EFTqe4eM7egcniTFD9qKfpmBNeOLXOldyCGnI0LhY6l9Wovj2G +YJefSHTGupW0RnYkp5+TMfTaTa4IhGIVGanApC3KzeOnWCgIjxKz/a4eKIihkWlxA6TjTojnXRQ+ 1OEVtTS3qI/0t2GeNdNXiYasSIdCLV1+/kCOueB8EzgspK5V75DnT74UIOueuNhJC7ZT9ugAQgphd N/Sj7CBHBaLydP6JbPiDw7yUySP2RAZVL+jQl7GGX5Rv0QRX2OZfgKm1pbVyMCfl1jwhRNxCkFLwV uGwWvz1Frs3Q1w==; Original-Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50487 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVHi0-0005iq-Vw; Mon, 05 Sep 2022 15:24:37 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 19 Fructidor an 230 de la =?UTF-8?Q?R=C3=A9volution, ?= jour du Tagette X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: (Jean Abou Samra's message of "Mon, 5 Sep 2022 20:39:26 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10367 Archived-At: Hi, Jean Abou Samra skribis: > Le 05/09/2022 =C3=A0 09:48, Ludovic Court=C3=A8s a =C3=A9crit=C2=A0: >> Hi Jean, >> >> Jean Abou Samra skribis: >> >>> Regular expressions do funky things with Unicode if a non-Unicode-aware >>> locale is set. Yet, they're purely string operations, so I don't think >>> it's expected that they depend on the locale encoding. >> This is the expected behavior: first because (ice-9 regex) is >> implemented in terms of the libc regex functions, as Dale put (but that >> could be thought as an implementation detail), and second because things >> such as character classes are necessarily locale-dependent (this has >> bitten us in the past, for instance with ). >> >> I hope that makes sense. > > > > OK, thanks, but in this case, it should be clearly stated as a limitation > in the (ice-9 regex) documentation IMHO. If you don't know what constrain= ts > there are on the implementation, there is no reason to expect this. Would= it > help if I submitted a patch for that? Yes, that=E2=80=99d be welcome. I would not call it a constraint or limita= tion; for example, that =E2=80=98w=E2=80=99 is not a letter in Swedish is the kin= d of thing you=E2=80=99d generally want to take into account. Now, it=E2=80=99d be ni= ce if one could easily specify the locale to operate under, with an API similar to that of (ice-9 i18n) and its first-class locale objects. Thanks, Ludo=E2=80=99.