-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
collation: add pinyin collation for chinese charset support #20790
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9eb99e1
to
5fce5d0
Compare
5fce5d0
to
f1c464a
Compare
c03953b
to
69b581f
Compare
bb7133
reviewed
Nov 5, 2020
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.
LGTM
@xiongjiwei: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component/expression
needs-rebase
Indicates a PR cannot be merged because it has merge conflicts with HEAD.
status/LGT1
Indicates that a PR has LGTM 1.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: This issue provides an alternative for issue #19747 and #10192
Problem Summary:
What is changed and how it works?
many users in China would like to sort Chinese characters with pinyin order.
Proposal: #19984
How it Works:
we use a big table to store the character's weight. To compare two strings, just find the character's weight one by one.
For all Chinese characters, we sort them and give them the weight
from 1 to n
according to zh.xml file in cldr24 and then plus0xFFA00000
For non-Chinese characters, we convert them to
gb18030
codepoint, and if0xFF000000 + codepoint + 0x1E248
to be weight.benchmark
The test string length is
2<<20
Check List
Tests
Release note