Bug 441271

Summary: [Feature Request] Support sorting files by Chinese numbers
Product: [Applications] dolphin Reporter: bgt <2793603265>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: 1293660441, isma.af, kfm-devel
Priority: NOR    
Version First Reported In: 21.08.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Chinese number sorting

Description bgt 2021-08-21 01:39:02 UTC
SUMMARY
Hope Dolphin could support sorting files by Chinese numbers order when sorting by filename:一(one),二(two),三(three),...
Comment 1 Ismael Asensio 2021-08-21 13:29:34 UTC
Created attachment 140913 [details]
Chinese number sorting

That's an interesting request. Thanks!

Sorting of chinese numbers fails, first on a string level, because their unicode representations are not sorted as the numbers they represent. Instead they get sorted as 1 7 3 2 5 9 8 6 10 4 (https://shkspr.mobi/blog/2016/11/how-do-you-sort-chinese-numbers/).

For what I've checked up, for advanced sorting, dolphin relies on the Qt sorting mechanism through the class QCollator, which supports internationalization.

I think this might be an issue which is worth to fix upstream.
Comment 2 bgt 2021-08-22 06:58:22 UTC
(In reply to Ismael Asensio from comment #1)
> Created attachment 140913 [details]
> Chinese number sorting
> 
> That's an interesting request. Thanks!
> 
> Sorting of chinese numbers fails, first on a string level, because their
> unicode representations are not sorted as the numbers they represent.
> Instead they get sorted as 1 7 3 2 5 9 8 6 10 4
> (https://shkspr.mobi/blog/2016/11/how-do-you-sort-chinese-numbers/).
> 
> For what I've checked up, for advanced sorting, dolphin relies on the Qt
> sorting mechanism through the class QCollator, which supports
> internationalization.
> 
> I think this might be an issue which is worth to fix upstream.

So, will this feature be considered?
And is It feasible to convert Chinese numbers into Arabic numbers before sorting?But...there're also problems.For example Chinese numbers don't always represent Arabic numbers in meaning...
Comment 3 Huanyu Liu 2025-03-05 03:40:43 UTC
In my opinion, it is not a good idea to implement this feature as a "generic" one. As bgt pointed out, the characters of Chinese numbers don't always have a numeric meaning. For example, they can be used in person names (李一鸣), or in some compounds (一致). Consider a similar case in English: it is not a good idea to have "Thomas Nine" sorted before "Thomas Brown" just because his family name "Nine" is treated as 9.

Indeed, Chinese numbers are quite often used in formal documents as "附件一/二/三/…" (Attachment No. 1/2/3/...). But as far as I know, there is no *generic* sorting method aware of this. If this feature is really needed, then I suggest implementing it as an optional "plugin". By the way, Japanese users will also benefit from this besides Chinese users.

Also, Ismael's result is only true in a non-Chinese environment. By default, characters are sorted by Pinyin in a Chinese environment. The result should be:
八 (8, bā), 二 (2, èr), 九 (9, jiǔ), 六 (6, liù), 七 (7, qī), 三 (3, sān), 十 (10, shí), 四 (4, sì), 五 (5, wǔ), 一 (1, yī).
Not that bad before 5?