-
Notifications
You must be signed in to change notification settings - Fork 171
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
Incorrect special character sorting #2573
Comments
@vonox7 The sorting behaviour you mention is the expected one. I have created realm/realm-java#4527 to clarify. Moreover, I will update the documentation so it is clear tha this is the intended behaviour. |
@kneth Thanks for the update. The documentation update explains the intended lowercase/uppercase problem. But the characters like |
#777 is related |
I'm shocked that such divergence from all the existing specs exists for years unresolved... How am I supposed to sort contacts by name to form a (#) group after a |
Hey @nalexn - happy to see someone still cares! We surely would love to get this fixed, and while we hoped for a simple solution by adding full ICU support from the platforms, none of the mobile platforms really support that in an official way, unfortunately (despite earlier promises..). Just including all of ICU is also out of question for size reasons. So it looks like we have to get more inventive and offer some kind of opt-in solution or configuration of sorts so that we don’t blow up the library size significantly for those that don’t need this. We can’t really promise anything about when we can take that on, but it’s not on our immediate shortlist for now. We have hundreds of good ideas in the backlog and we do try to prioritize features based on user feedback so that we give most people the highest value all the time. So definitely appreciate your "upvote" on this! In the meantime, did you actually find a workaround? Otherwise happy to help out! |
Hi, We also really would like to be able to control the sorting. I have outlined a suggestion in realm/realm-js#3770, perhaps you could do something along those lines? |
The JVM, Swift and all other programming languages (see also unicode specification) mentioned in src/realm/unicode.cpp) define the following character sequence as "sorted:
!"#$%&'()*+,-./123:;<=>?ABCXYZ_abcxyz
In contrast, Realm 3.1.2 considers the following as "sorted":
'- !"#$%&()*,./:;?_+<=>123aAbBcCxXyYzZ
Code for reproduction
The realm sorting algorithm has the following bugs:
'
and-
are before the characters!"#
:
and=
?
,+
and_
are in the wrong positionThe realm sorting documentation has the following missing:
It seems like realm doesn't comply to any standard (unicode, ascii...) and just sorts all special characters by a random specification and order.
The text was updated successfully, but these errors were encountered: