emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case-insensitive string comparison


From: Eli Zaretskii
Subject: Re: case-insensitive string comparison
Date: Tue, 26 Jul 2022 22:30:21 +0300

> From: Bruno Haible <bruno@clisp.org>
> Cc: sds@gnu.org, emacs-devel@gnu.org
> Date: Tue, 26 Jul 2022 20:56:10 +0200
> 
> Eli Zaretskii wrote:
> > With the
> > current machinery, a Lisp program or a user can control up/down-casing
> > by specifying a buffer-local case-table, and we won't give up this
> > important functionality.
> 
> For which types of users, and for which use-cases, do you consider this an
> "important functionality"?

One example that immediately comes to mind is when you need to downcase
strings without being hit by the case of 'I' in the Turkish locale.
We use this, for example, when parsing various Internet protocols.

More importantly, Emacs had this feature for many years, so suddenly
losing it is not really a possibility.

> Recall that the Unicode casing tables already cover the special cases for
> 'ß', Turkisch i, and so on.

We have the infrastructure for supporting that, and do so in locales
where that is required.  In particular, Emacs imports the data from
the Unicode SpecialCasing.txt file.

> I'd like to understand whether per-user customization of casing rules is
> so important that libunistring should offer it in the API (as opposed to
> requiring code modifications).
> 
> LibreOffice, for example, allows per-user customizations of the spell-
> checking dictionary, but not of the casing tables. Is that a flaw, and why?

Emacs is not only a text-editing program, it is primarily a
text-processing environment.  When you write programs that process
text, control of case conversions is sometimes important.

Whether this means libunistring needs to grow such an API, I don't
know.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]