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 13:06:41 -0400 Message-ID: References: <87ilnsq4cr.fsf@gnu.org> <87mtd3n455.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="9053"; 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, Roland Winkler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 20 19:08:11 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 1oEDBD-00026g-Ly for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jul 2022 19:08:11 +0200 Original-Received: from localhost ([::1]:47974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEDBC-0005xj-Al for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jul 2022 13:08:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oED9v-0004dr-EL for emacs-devel@gnu.org; Wed, 20 Jul 2022 13:06:51 -0400 Original-Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:46653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oED9q-0005Uc-D5; Wed, 20 Jul 2022 13:06:49 -0400 Original-Received: by mail-qv1-xf2a.google.com with SMTP id l11so13917102qvu.13; Wed, 20 Jul 2022 10:06:43 -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=izd59oevElbiblMJYUv/iAWGUmmn854kR4cqXuBQ4uc=; b=CLLgsLFlp+OYAIgXG5pWr5ojr60eUIZSOadsXsG3xK8o1vb3v3+2HeyzaeKls4Azhr LtwpTPt519fQnwFH4ugZph0jMK+dBs2j2H/e+rIgnGlpK1N8FCbPxt8EAYr9yibAdqxN +ya1UFh7TrAM5bj/eZ8tgq9ZvBwQ4uGO0c7ivwtDlcxgwiXF4+PLpuewnRlC01Y51LEt lgCAcHeA7KKcm9uwD6uXXKA2WZw0FW5R/bV40sAscPMQwbvrrUA7E92iuNrOWWnwROsd X4CtCb97W8GODWjrv4Kn3uaADwGc5V2px5xX22nxtvI1wlh8AmofQgMmkqY3iOIduXcc /iFQ== 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=izd59oevElbiblMJYUv/iAWGUmmn854kR4cqXuBQ4uc=; b=PtkFJIq9JTEEu02PzYiuIOVOYdJU6iVboXVfSSLfbY5AWsHajAIHj+07qUpgILBHub Ev9D1noD8v9oH3M6N5TTNcz6MHH8gqfgtpv41Z/GvB+lcL3fQDGlji54fs8ejY/ptjTV JzxkCmMuOfia/MONG54yfYw4z7/GhaiDmjiH2tRq6wXHUSPgKCB8IM/gRLiCcZdZTrmS cx/MC86oLC+/9grVmZdL0v/44yMD7pDXVBgQ6e3zekmCo24wWmHubNK3KSFpKFDs+pDm n/e6QMwnqq0da+et4PPiEKpCqHkPyimIyRx4HMVsY6pHjmd6THw8Pf1H5u8VVqh9JOkc l4Ow== X-Gm-Message-State: AJIora+8joi5k4vtHhNUrMR9N8t/8x/lJ7EPeINtWJaRWUh/YMhs02+v R1h0Z04nh1LPog+MCHAh6w0+tDfqQw== X-Google-Smtp-Source: AGRyM1v5UErqqmu1/WW8HWbZQJW+gISxWYyfV/i9t9O8uQYeYRi73AqhYWwY0zw4re2rfLgMV5qG+w== X-Received: by 2002:a05:6214:529e:b0:473:1e3a:9f1b with SMTP id kj30-20020a056214529e00b004731e3a9f1bmr30540634qvb.41.1658336802242; Wed, 20 Jul 2022 10:06:42 -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 bs12-20020ac86f0c000000b0031ee3f2faf3sm8788045qtb.56.2022.07.20.10.06.41 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jul 2022 10:06:41 -0700 (PDT) In-Reply-To: <87mtd3n455.fsf@gnu.org> (Roland Winkler's message of "Wed, 20 Jul 2022 11:24:38 -0500") X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Mail-Followup-To: emacs-devel@gnu.org, Roland Winkler Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=sam.steingold@gmail.com; helo=mail-qv1-xf2a.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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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:292310 Archived-At: > * Roland Winkler [2022-07-20 11:24:38 -0500]: > > On Tue, Jul 19 2022, Stefan Monnier wrote: >>> 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`? > > - BBDB needs to know whether a name is already present in the database > or not, ignoring case. The function bbdb-string= is again what Sam > suggests to put into subr.el. The function string-collate-equalp > might be better suited for this. But which locale should it use? `bbdb-file-coding-system' ? > Is there a "univeral default locale"? UTF-8 is, I think, the generally accepted universal default today. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.2113 http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com https://www.memritv.org https://iris.org.il https://www.dhimmitude.org If you need a helping hand, just remember that you already have two.