bug#80761: Proposal: Sort Chinese numbers

Pádraig Brady <[email protected]> Fri, 10 Apr 2026 11:00:54 +0100
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On 10/04/2026 03:00, Collin Funk wrote:
> Thomas Wolff <[email protected]> writes:
> 
>> Am 07.04.2026 um 12:28 schrieb Dan Jacobson:
>>> I hereby propose Coreutils' sort(1) add the ability to sort Chinese
>>> (actually CJK) numbers.
>>>
>>> https://chinese.stackexchange.com/questions/64035/how-to-sort-chinese-numbers-with-a-computer
>>>
>>> Isn't Chinese has the most native speakers in the world so it's high
>>> time that sort(1) deal with the numbers, pun intended.
>> A suitable basis for such handling is file Unihan_NumericValues.txt in
>> the Unihan.zip from Unicode.org.
> 
> GNU libunistring has the uc_numeric_value function to convert Unicode
> characters to numeric values.

Related to this is conversion in general.
I.e. convert once and compare many,
trades more mem for better algorithmic behavior.
See strxfrm() for example.

cheers,
Padraig