bug-texinfo
[Top][All Lists]
Advanced

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

Re: index sorting in texi2any in C issue with spaces


From: Gavin Smith
Subject: Re: index sorting in texi2any in C issue with spaces
Date: Thu, 1 Feb 2024 22:16:07 +0000

On Thu, Feb 01, 2024 at 09:01:42AM +0200, Eli Zaretskii wrote:
> > Date: Wed, 31 Jan 2024 23:11:02 +0100
> > From: Patrice Dumas <pertusus@free.fr>
> > 
> > > Moreover, en_US.utf-8 will use collation appropriate for (US) English.
> > > There may be language-specific "tailoring" for other languages (e.g.
> > > Swedish) that the user may wish to use instead.  Hence, it may be
> > > a good idea to allow use of a user-specified locale for collation through
> > > the C code.
> > 
> > That would not be difficult to implement as a customization variable.
> > What about COLLATION_LANGUAGE?
> 
> What would be the possible values of this variable, and in what format
> will those values be specified?

I imagine it would be a locale name for passing to newlocale and thence
to strxfrm_l.  What Patrice implemented hardcord the name "en_US.utf-8"
but this would be a possible value.

(If there are locale names on MS-Windows that are different, it would
be fine to support them the same way, only the invocation of texi2any
would vary to use a different locale name.)

An alternative is not to have such a variable but just to have an option
to collate according to the user's locale.  Then the user would run e.g.
"LC_COLLATE=ll_LL.UTF-8 texi2any ..." to use collation from the ll_LL.UTF-8
locale.  They would have to have the locale installed that was appropriate
for whichever manual they were processing (assuming the "variable weighting"
option is appropriate.)

It is probably not justified to provide an interface to the flags of
CompareStringW on MS-Windows if we can't provide the same functionality
with strcoll/strxfrm/strxfrm_l.

It seems not very important to provide more of these collation options
for indices as it is not something users are complaining about.



reply via email to

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