From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.devel Subject: Re: Letter-case conversions in network protocols Date: Sat, 08 May 2021 17:41:37 +0200 Message-ID: References: <83h7jda71o.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="34054"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cc: Eli Zaretskii , emacs-devel@gnu.org, Fatih Aydin To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 08 17:42:52 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lfP6S-0008iG-NS for ged-emacs-devel@m.gmane-mx.org; Sat, 08 May 2021 17:42:52 +0200 Original-Received: from localhost ([::1]:42186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfP6O-000697-TH for ged-emacs-devel@m.gmane-mx.org; Sat, 08 May 2021 11:42:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfP5O-0005Sd-Nb for emacs-devel@gnu.org; Sat, 08 May 2021 11:41:46 -0400 Original-Received: from sonic310-11.consmr.mail.ir2.yahoo.com ([77.238.177.32]:46699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfP5K-0002LW-LN for emacs-devel@gnu.org; Sat, 08 May 2021 11:41:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1620488499; bh=zYeYZ1BbWYFD4C2h8Ylips3uLfPFuVtfdFb/bXxwjC0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=b7iElZrtNH1Go4REsUBK+UG3X3qWPuN9UBOoWMYxcn3PYhRZhl0eGzvCN93ahwdRv4jNloFL92YKhLjZsZts42ZEA+MIX+bT27hHTdqYQep1wC2y2RmwWnVrSGiIUbTtVK32h4iNp8A2xmHTHErp8FDOc6ZJyoAiyRJp0KS8Fi8WARIus0AF+rC54U6sAU2g0Kp1iHXIVg/yZ0wQP+FMky2Rk+LIXKMU9GoOM0f7Kz+Ua1cYKhOB3GBiZ2zB2cXfpGMvj4TXFzvb3r8KrPFjB5Wrxb6IY4SJDgrN+emgZ2yLD9N5lM2lAdobPsC21OaDWDFEbgmZEZOXvV3YXd3tlw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1620488499; bh=9FWv8wwqwUjIm+A5GMVcF3Z+tj5WlsGUSXxPp1r6OjQ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=hRoGnZoz65IO8XKkfjGy3bAoC4o2tK9zHctHbQvaRve3ClK7TMDeo4KQ8sQL7iie7YVp5CFi7d30dcwUw2pZBl00mD8iDXqMvOFKHZlg60+HX/UHL5M7DEnnSpnUVkkStvoUNYdewYtdcuyTea1OgDUcQ5SFqwUXWnnhs/fTAcvqUuexToO9HyxsAEJwqpmlTLwOIXhdpuRHcGe6Wfb0i2ScEEkpNN9mWcn7nK5fOYdTaD5qUUtJA/1u+GyX6hAgO4dloGVy5eJu4wPsknwP8C5scgFyNv/ZaJ5AlNcvX/YC4SXQYn0grEr6pqZfU7ez7PzSfytFornZv/jPBRFivg== X-YMail-OSG: JrrJvw4VM1lYKcsbRv2.k0LsI5pHMXUlDfQ_iuvg713X_3UejFmxlEU5VTjxmYP BZq4CYYJktW7.xslvt6.GZd.8frbbRl40AUpV1sZR4JA16_3ORs_0MZltfv8z5epPKG_8nnTifpA H15mZnzE8g7pGxP80Ia4uDPL6XIAMoyrVmlWXVdVXHgGmhR21Noc3VTaxE.Y_dIrV1X7.7VaLLgQ DIuH1bNUgqtjPrxnCe38JkEuYIgB9rdUTNaGHm7PxKX_zRH4UByYYBnDzL45q8X6BULiKs.ZtU5J dPhmJFJMi7sxLL7jA2.KIelYnJ9np9sG9Vawx2nJALBSH2U6vQSy4UdlqaRhKKrPbkVP0SNeCQTa eyQ11TgfwCe.2lBeolRoE_4nen.DBZ1bFWUih2xAeiFy7p17Fp5Hg2mIdFIeaJXWrCtgTo3xpn7M FYT.oSZyIKPMxFz0YINK5ZQO5Cz.w4T.gOA3xlY6_WAuuAWb08mV1Uy3BJjnUI5Z_bqwRCtvtcIv 6A3xmpbiE7.QLcgod3LcnnwN8yWihWfHlW0NZ6bOEU6htPABexYdcDPDbugxH17dbBSRKhZJw8qr H9idfeMr8NbxSHTVhPDvRslh8RpTY0EEzbd6sW3tGsFoeDYc9eNZm_wIr9GM5BfBmqI2zjnqKH0F DzBhkJ3WcHTdMiWt.TgNZbTzowMmCFZBsKIm0675RaZ64fAg50TStrz21y7RfqJvnhNYg8XoTqk5 aCCdgS59RtMe3ExC.FlMWGgZfpraZ0gAHrQlLPbAF7im803Z74sOZt5n9rWa7xkrKC.zOlXWvoWF Gip905vVOJeY.Bim9LGZrejz_biNfZtKxyUtkmKmKU X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Sat, 8 May 2021 15:41:39 +0000 Original-Received: by kubenode550.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID aa3dfe3c4b4295a9427618c015885e07; Sat, 08 May 2021 15:41:38 +0000 (UTC) In-Reply-To: (Stefan Monnier's message of "Sat, 08 May 2021 09:47:56 -0400") X-Mailer: WebService/1.1.18231 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/16) Received-SPF: pass client-ip=77.238.177.32; envelope-from=mardani29@yahoo.es; helo=sonic310-11.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269053 Archived-At: Stefan Monnier writes: > > This said, another approach is to improve our handling of case-fold: inst= ead > of applying `downcase` on both sides and checking that it gives the same > result, we should be using a "normalization" function which will return > "the representative" of a given equivalence class. E.g. in a Turkish > locale, `i`, `I`, and `=C4=B1`, ` should all belong to the same equivalen= ce > class and this normalization function should hence return the same value > for all three. > I like this, but I think it should be a different option (say `case-fold-culture-invariant-search' or something like that), because both ways to perform case-insensitive comparisons have their purpose, depending on the context. Then we could audit instances where 'case-fold-search' is set to non-nil in the codebase and see if replacing them with the culture-invariant form would be TRT to avoid these kind of subtle bugs that can specially affect our Turkish and Azeri users. Of course, code can still be broken if people explicitly do its own thing with `downcase', etc. instead of using the case-folding string APIs, but that's sort of an anti-pattern, anyway.