From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: case-insensitive string comparison Date: Wed, 20 Jul 2022 12:22:33 -0400 Message-ID: References: <87ilnsq4cr.fsf@gnu.org> Reply-To: sds@gnu.org Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10765"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) To: emacs-devel@gnu.org, Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 20 18:23:45 2022 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 1oECUC-0002an-QG for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jul 2022 18:23:44 +0200 Original-Received: from localhost ([::1]:42244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oECUB-00025m-Fo for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jul 2022 12:23:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oECTF-00019O-6q for emacs-devel@gnu.org; Wed, 20 Jul 2022 12:22:45 -0400 Original-Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:34686) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oECT7-0006jY-H6; Wed, 20 Jul 2022 12:22:44 -0400 Original-Received: by mail-qv1-xf2d.google.com with SMTP id mh14so1276557qvb.1; Wed, 20 Jul 2022 09:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:user-agent :return-receipt-to:reply-to:mail-followup-to:date:message-id :mime-version; bh=rHRVhzsEUTXpOKgmyBLezY77/ljGsmFR3AZKDqxHlX4=; b=FI6aMLDTfuFmQcivTqSaPo5uuLCypsz5KUal+eucakwQL30delqPCbg7qoAGVTYgWf xkpvTVSNpegOu4BEwGrcNetA6TF5PqqWiJZzUmuWB9jd8WJBLvEQZVdltWzRVPWVS62t ZlzQzZjMp5th8T8iHuTw22XP6MipDT1crtN+R2we5R3lkdl9pGBFE82lW7TD0z3CFxiW H68ir1oifpNRiVbeEMcAyM9l3eKysZdcBEv6drBAXrGb/D37eHu0ZbD2ch98rCkzHIvT pXWk0YcFACz/BSYNS9U0h876brj6k0VjNpxRLaCYx29UvVfC0EGxT0W16DkCi4z49jjM QEpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:in-reply-to:references :user-agent:return-receipt-to:reply-to:mail-followup-to:date :message-id:mime-version; bh=rHRVhzsEUTXpOKgmyBLezY77/ljGsmFR3AZKDqxHlX4=; b=yFXJfgp8s7c6eKEH0Yx0L+Pevd8vKnBOPENWQIfOzcDf49xT2Etw8erBw8ERy0iNhO QlpizhgL4xSjO5L/pWfoNZz849rT1Xhv9HvYrK0RUNHmZv6LRpoHsb4Gvl0c+vxeSmS9 xgsF9y2Mg/XbxGXKX8E0LpegZczMiwJniky22LLSZbK7SjY/Z9ahtJJsK+8G1P3/lgFD LCYlQrq70u/b3KWBeDC9YJSGnJPkifBSgIbOhzyEKg02CyBHq0pGoxC3G3uGL1ea5esx qrcDmxnY5x9OCv89vXrfQ3KBLaWStccahFYxMvIJkm/bSpwbvaf3bQIvL2YyHeM3T11d dJEg== X-Gm-Message-State: AJIora8g0bUssHaj5HXXPpjS7825BAnzO77mK9F/dNYnCR116AchA/sR lTa0m0W9qhPojifE9WLbXnFOBxoAog== X-Google-Smtp-Source: AGRyM1uMsLFRt4xmlXuPpIYzCHm2OAahXxNygD6tNzeYLwHRMrXK0xZDhGHTo8xbvR8HSz26Yoh6gQ== X-Received: by 2002:ad4:5dcc:0:b0:473:9d1d:a1e with SMTP id m12-20020ad45dcc000000b004739d1d0a1emr27266437qvh.54.1658334155352; Wed, 20 Jul 2022 09:22:35 -0700 (PDT) Original-Received: from 3c22fb11fdab.ant.amazon.com (pool-108-30-23-113.nycmny.fios.verizon.net. [108.30.23.113]) by smtp.gmail.com with ESMTPSA id c8-20020ac86608000000b0031eb6b42b26sm12216614qtp.73.2022.07.20.09.22.34 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jul 2022 09:22:34 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 19 Jul 2022 23:01:31 -0400") X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Mail-Followup-To: emacs-devel@gnu.org, Stefan Monnier Received-SPF: pass client-ip=2607:f8b0:4864:20::f2d; envelope-from=sam.steingold@gmail.com; helo=mail-qv1-xf2d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:292308 Archived-At: > * Stefan Monnier [2022-07-19 23:01:31 -0400]: > >> PS. Actually, compare-strings/ignore_case is broken because it does, >> essentially, upcase both arguments, see https://stackoverflow.com/q/319426/850781 > > Hmm... `string-collate-equalp`? --8<---------------cut here---------------start------------->8--- (string-collate-equalp "a" "A" current-locale-environment t) ==> nil current-locale-environment ==> "en_US.UTF-8" --8<---------------cut here---------------end--------------->8--- -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2113 http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com https://ij.org/ https://memri.org https://honestreporting.com There are 3 kinds of people: those who can count and those who cannot.