bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18051: [Emacs-diffs] trunk r117726: Add string collation.


From: Eli Zaretskii
Subject: bug#18051: [Emacs-diffs] trunk r117726: Add string collation.
Date: Fri, 29 Aug 2014 22:31:49 +0300

> From: Michael Albinus <address@hidden>
> Cc: martin rudalics <address@hidden>,  address@hidden,  address@hidden,  
> address@hidden
> Date: Fri, 29 Aug 2014 20:01:50 +0200
> 
> Eli Zaretskii <address@hidden> writes:
> 
> > Case-insensitive versions of the new functions are yet to be written;
> > stay tuned.
> 
> I've just committed a patch to the trunk which adds optional arguments
> LOCALE and IGNORE-CASE to the collation functions.

Thanks.

> > For now, on MS-Windows, you can have that if you use the
> > NORM_IGNORECASE flag as the second argument of CompareStringW inside
> > w32_compare_strings.
> 
> As usual, this I haven't implemented. I would let it to you, Eli.

As usual, done.

I needed to introduce a w32-specific variable, which needs to be bound
to a non-nil value in order to have UTS#10 (a.k.a. "Unicode Collation
Algorithm", or "UCA") compliant collation order, which ignores
punctuation differences, on MS-Windows.  This is because Windows
doesn't support UTF-8 as a codeset in its locales (and Windows locales
have different names anyway).  This means that if a Lisp program needs
to make sure it gets a UCA-compliant collation order on all platforms,
it will have to pass a "xx_YY.UTF-8" locale on Posix platforms, and on
Windows bind that w32-specific variable to a non-nil value.

Btw, I think we will need a lot of verbiage in the ELisp manual to
make sure people understand what to expect from these functions.  In
particular, the results are extremely locale- and platform-specific,
so one cannot expect exactly the same results in all cases, only
something similar.





reply via email to

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