how do you sort by name? #2623
Replies: 7 comments 1 reply
-
DO NOT TELL ME YOU SORT BY THE UNICODE POINT 🧐 |
Beta Was this translation helpful? Give feedback.
-
as of current we are simply using SQLite sorting according to @fogodev (haven't looked myself but I believe him lol). worth looking into for future releases! probably not soon given the difficulty of implementing an algorithm to reliably do it for all alphabets. there may be a library but its not a priority for implementation where we're at, but will likely be a must-have for 1.0. creating an issue for this, maybe an open-source contributor will get to it before we do! if not we are eyeballing this issue. |
Beta Was this translation helpful? Give feedback.
-
there are many challenges with the current sort order The challenge now is. For example, windows explorer sorts in the following order
for more information, please refer to the following URL... in addition to the alphabet, the following major characters are used in asian countries.
these characters are very difficult to understand from an english-speaking point of view. |
Beta Was this translation helpful? Give feedback.
-
@Rsfinder I may tell you something about CJK characters as I know.
Generally speaking: Chinese character (in English) = Hanzi (in Mandarin Chinese) = Kanji (in Japanese) = Hanja (in Korean) = Hantu (in Vienamese although they may do not use this word) = 汉字 = 漢字. As Unicode characters they are just equal but they read different in different languages. As the most widely used logogram there are so many regions for Chinese characters to consider. At least the following things are necessary for now:
|
Beta Was this translation helpful? Give feedback.
-
Today I've checked if there is available libraries to do the related work. The key is icu (for rust it can be a crate) which provides Collator objects to do operations. |
Beta Was this translation helpful? Give feedback.
-
So @iLynxcat @fogodev here's all to do:
|
Beta Was this translation helpful? Give feedback.
-
We already did some investigation in this matter. The main issue is that we need to interact with SQLite on a more direct manner to do it, but we're currently many abstraction layers above it, (Prisma, Quaint, Rusqlite, etc). We haven't forgotten this issue, but we're currently busy on other issues, mainly related to sync. Android for example ships a version of SQLite already with the necessary collation mentioned here http://www.sqlite.org/faq.html#q18 We can't do it in the Rust side, because we list files by paginating them directly from sqlite. To sort in Rust we would need to load literally your entire file_paths table in memory for the desired location, sort in Rust, discard everything that will not be included in the current pagination and return the results. For each pagination in the UI. Which is a big no-go performance wise. Specially because one of our main audiences are potentially big data hoarders with many TB of files. (I only tested with Jamie on TB scale, managed to index some TBs of media files in a couple of minutes, even in dev mode, with my current implementation of parallel indexer and file_identifier). |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
This issue talks about things of how to sort by name (of files, tags, etc).
With English, it's just okay to sort by A-Z order. For languages like Russian I think sort by their names also works (although i don't know how it goes actually). The way to sort files in Chinese looks weird. Usually file managers of different systems sort them by the A-Z order of Pinyin, but on Spacedrive I can't tell how they're sorted. It makes no sence.
Also I wanna ask users who speak Japanese, Korean and other languages about the experience of sorting by file name.
Reproduction
No response
Expected behavior
No response
Platform and versions
Alpha v3.0.1 for windows-x86_64, but users of different platforms may concern
Stack trace
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions