-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
"Alphabetical" sorting is not alphabetical - Sorted by ASCII code instead #15582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What database are you using? |
On the system i migrate to sqlite3. Which one the try.gitea.io instance uses, i do not know. |
Yes, this is how sqlite does sorting, so it is only sqlite speciffic problem. To have case insensitive sorting sqlite needs |
Just use |
Hello, I don't know about repo names, but the same issue is present for repo file names. Thanks |
I can see 2 problems here. The first one is for "database collation". I think SQLite is too special for this case, and it doesn't seem worth to make XORM more complex to support the special sort order. It's highly recommended to use some rich-featured databases like MySQL/PgSQL, then you could convert the table/column collation to what you need. The second one, I think it could be fixed by #29611 (I think this issue could be closed after #29611 gets merged) |
[x]
):Description
The alphabetical sorting is currently not alphabetical, as lower- and uppercase letters are "sorted" seperately. This is likely due to ASCII Code comparison (e.g. "B = 66", "a" = 97).
In the linked example i made three repositories to showcase this: Beta and Omega, starting both with uppercase letters and alpha, starting with a lowercase. With an alphabetical sorting it would be expected to be sorted as "alpha", "Beta", "Omega". Instead, "alpha" is pushed to the back.
Among other things, this can be an error source for people migrating old, inconsistently named VCS to Gitea.
Screenshots
The text was updated successfully, but these errors were encountered: