-
Notifications
You must be signed in to change notification settings - Fork 330
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
Add option to sort base on certain locale. #1818
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your contribution.
I think it is a good idea to support locale-aware sorting, but I would prefer to implement it in a way that doesn't introduce too much complexity. I have left some comments which you might want to look at, although I personally don't have much experience with using the collate
library.
Also note that there is a change freeze for a couple of weeks while I am planning to make a new release, so this PR will have to wait until after that point to be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying your expectations about how locale
should work. I've gone through the code in a bit more detail this time, but this should probably be the last set of comments and I think the PR looks much better overall.
Also FYI you can add something like Fixes #323
to the PR description, which will link the issue properly and automatically close it when the PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think it looks good now. I have given my approval, but will hold off merging it until after the freeze period is over.
This pull request adds implementation for sorting with user provided locale (Fixes #323).
An new option
locale
is introduced, which has default value''
. And this option supportssetlocal
.*
is used to indicate reading locale value from environment.