[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: case-insensitive string comparison
From: |
Roland Winkler |
Subject: |
Re: case-insensitive string comparison |
Date: |
Wed, 20 Jul 2022 13:10:35 -0500 |
On Wed, Jul 20 2022, Eli Zaretskii wrote:
>> Even mentioning the difficulties could be useful here.
>
> I'm not sure I agree. To describe all the important aspects of this
> would take too long, and it isn't the job of our manual to document
> this stuff. Read this if you want to know:
>
> https://unicode.org/reports/tr10/
A footnote pointing the interested reader to this report could already
be useful. I am not suggesting to try to provide a more exhaustive
discussion of this topic. I am suggesting to mention briefly that the
topic is subtle and depends on details "beyond emacs itself".
>> I am not sure I can follow your argument. Do you suggest that, likely,
>> BBDB will work best if it compares names using compare-strings?
>
> Yes.
Thanks, that's already good to know!
> But in addition, you should set up the case table of the current
> buffer when you do so, because otherwise special cases with the likes
> of the Turkish language's dotless I could in rare cases screw you.
>
>> (I'd be glad to hear that.) This code should work for users who do not
>> want to build their own case table and stuff like that.
>
> Not the users should build the case table, BBDB (or whatever Lisp
> program that needs the comparison) should. It's not that hard,
> really: if you only need ASCII, use ascii-case-table, otherwise copy
> the standard case-table and modify it to make sure I downcases to i
> and similarly with a few other exceptional letters.
I am not sure it would be possible to predict how a default case table
for BBDB should differ from the standard case table. BBDB might be the
only package of a user that accumulates strings that go beyond what
otherwise a user is dealing with regularly. If there is a sensible
"BBDB default case table" I'd hope that this is the standard case table.
Or if not: can you suggest an emacs package that I can look into as a
source of inspiration?
- Re: case-insensitive string comparison, (continued)
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/19
- Re: case-insensitive string comparison, Roland Winkler, 2022/07/19
- Re: case-insensitive string comparison, Stefan Monnier, 2022/07/19
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/20
- Re: case-insensitive string comparison, Roland Winkler, 2022/07/20
- Re: case-insensitive string comparison, Sam Steingold, 2022/07/20
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/20
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/20
- Re: case-insensitive string comparison, Roland Winkler, 2022/07/20
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/20
- Re: case-insensitive string comparison,
Roland Winkler <=
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/20
- RE: [External] : Re: case-insensitive string comparison, Drew Adams, 2022/07/20
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/21
- Re: case-insensitive string comparison, Roland Winkler, 2022/07/21
- Re: case-insensitive string comparison, Eli Zaretskii, 2022/07/21
- Re: case-insensitive string comparison, Roland Winkler, 2022/07/21