Skip to content

The comparison result of Unicode strings looks strange... #51726

Answered by huoyaoyuan
Flithor asked this question in Q&A
Discussion options

You must be logged in to vote

The default overload of string.Compare uses current culture. Under Chinese culture, the comparison is based on Pinyin, thus yi > er.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Flithor
Comment options

Answer selected by Flithor
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants