8000 🐛 Bug Report: Sorting doesn't work for other alphabets than english · Issue #6327 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🐛 Bug Report: Sorting doesn't work for other alphabets than english #6327

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

Open
2 tasks done
Megamannen opened this issue Sep 25, 2023 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working product / databases Fixes and upgrades for the Appwrite Database.

Comments

@Megamannen
Copy link
Megamannen commented Sep 25, 2023

Probable solution is be able to set the locale of the underlying db or table maybe?

👟 Reproduction steps

Noticble with ÅÄÖ åäö in Finnish (and Swedish)

Add a collection with an attribute name
Add two documents

[
   { "name": "Åsa" },
   { "name": "Asbjörn" }
]

Query the collection and sort by name with ascending order

👍 Expected behavior

Asbjörn
Åsa

👎 Actual Behavior

Åsa
Asbjörn

🎲 Appwrite version

Version 1.4.x

💻 Operating system

Linux

🧱 Your Environment

1.4.2

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@Megamannen Megamannen added the bug Something isn't working label Sep 25, 2023
@stnguyen90 stnguyen90 added the product / databases Fixes and upgrades for the Appwrite Database. label Sep 26, 2023
@melsonic
Copy link

I wanna work on this one.

@fogelito
Copy link
Contributor

@melsonic This is happening because we are using utf8mb4_general_ci
meaning Ä === A

@fogelito
Copy link
Contributor

MariaDB 10.7 does not support accent insensitivity only from 10.10

@grooverdan
Copy link

uca1400 is definitely 10.7+, however utf8mb4_swedish_ci is available earlier and works on the ordering prescribed.

MariaDB [test]> alter table t modify v varchar(30) charset utf8mb4 collate utf8mb4_unicode_ci;
Query OK, 0 rows affected (0.011 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [test]> select * from t order by v;
+----------+
| v        |
+----------+
| Åsa      |
| Asbjörn  |
+----------+
2 rows in set (0.010 sec)

MariaDB [test]> alter table t modify v varchar(30) charset utf8mb4 collate uca1400_ai_ci;
Query OK, 0 rows affected (0.019 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [test]> select * from t order by v;
+----------+
| v        |
+----------+
| Åsa      |
| Asbjörn  |
+----------+
2 rows in set (0.001 sec)

MariaDB [test]> alter table t modify v varchar(30) charset utf8mb4 collate utf8mb4_swedish_ci;
Query OK, 0 rows affected (0.003 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [test]> select * from t order by v;
+----------+
| v        |
+----------+
| Asbjörn  |
| Åsa      |
+----------+
2 rows in set (0.001 sec)

MariaDB [test]> alter table t modify v varchar(30) charset utf8mb4 collate uca1400_swedish_ai_ci;
Query OK, 0 rows affected (0.009 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [test]> select * from t order by v;
+----------+
| v        |
+----------
8438
+
| Asbjörn  |
| Åsa      |
+----------+
2 rows in set (0.001 sec)

@grooverdan
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / databases Fixes and upgrades for the Appwrite Database.
Projects
None yet
Development

No branches or pull requests

5 participants
0