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
Russian Alphabet Sorting - "Ë" Letter #30846
Comments
@hardikbhatia777 is this something you might want to be assigned? |
Yes. I'll start working on it right away. |
@casalsgh I have tried many combinations of Russian words. Lexicographically, the name starting with Ё is appearing as the first result regardless in the directory for me, while the other names seem to switch positions and arrange in the correct order: Is this the issue you were talking about? As far as I can tell, it should be EDIT: I see what you meant now, I'm working on a fix. |
working on it |
Hello @casalsgh, after a lot of research, this seems to be a very unique issue with UNICODE itself rather than the sorting function being used. I found that "Ë" is treated as follows: As such, I've coded a new sorting function specifically for this case using Intl.collator, which supports non-unicode sorting through language-sensitive string comparison. I have hard-coded it into the table component itself for now just to show the working. This is a workaround which would require refactoring of quite a bit of code, or more practically, maintaining a state to see if sorting occurs using 'name' and using the collator object in those specific cases. In short,
I'm unsure of which approach you would consider best, hence I thought it would be best to reach out first and ask. Best Regards, |
Hardik many thanks for the analyzes. Will check with others on the internal team and get back to you shortly. |
@hardikbhatia777 do you mind checking the issue in the mobile app for Rocket.Chat? |
Great read! Thank you for sharing. I'll check out the mobile repo and get back to you very soon. |
@casalsgh I went through the mobile repository, but I wasn't able to locate the specific sorting function that was fixing the issue. Is there any way you could direct me to the file? |
@hardikbhatia777 based on your assessment and discovery so far pointing to Unicode issues + complexity/level of effort to have it adjusted for rocket.chat we will not be pursuing the ticket. Will be tagged as won't fix and closed. PS: I'll tag you on future tickets again as I mentioned I would get you assigned for items. |
Issue Description
-When sorted alphabetically, contacts with the letter "Ё" are located at the bottom of the list but should be after the letter "E". The letter "Ё" is the seventh in the Russian alphabet, but in the sorting of contacts is the 33rd place.
Steps to Reproduce
-create a user with the Russian letter "Ё" at the beginning and a few other users with a name consisting of Russian letters
-Try to search for the user in the contact list
Expected Behavior
"Ё" is the seventh in the Russian alphabet therefore it should not be at the end of the search result
Actual Behavior
The name with this letter was at the end of the search result
The text was updated successfully, but these errors were encountered: