On 29.08.2017 14:04, Branko Čibej wrote:
On 29.08.2017 13:28, Stefan Sperling wrote:
On Tue, Aug 29, 2017 at 01:12:07PM +0200, Stefan Fuhrmann wrote:
How would you implement the case-insensitive comparison
on the server side consistent with the client-side locals?
As far as I can tell the utf8proc code which the client uses
for this is local-independent.

"Locale," but yes. Utf8proc relies on the Unicode generic case-folding
rules, which are indeed locale-independent. They won't always be 100%
grammatically correct for a particular environment, but from my reading
they'll be good enough for the purpose, which is to find stuff not write
a linguistic thesis. A few strictly-speaking false-positive edge cases
won't hurt.

Then it should not be hard to extend the existing code to
do "fuzzy" comparisons using generic case- and accent folding.

Because I think that strict glob-like patterns need to be supported
as well, I suggest to have two options:

   --search does a fuzzy search just like we use it in other commands.
            We implicitly add leading an trailing '*'.

   --search-glob performs a fully case- and accent-sensitive glob
                 matching.

As with '--search' alone, the user is free to specify any number
and combination of the above but without the support of '--search-and' -
at least for now.

Thoughts? Better names for '--search-glob'?

-- Stefan^2.

Reply via email to