Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SortKey is Invariant now.
  • Loading branch information
ilonatommy committed Dec 29, 2023
commit 709da38f7b3cc003ca5c1c3d8247f78bf3f8cea0
4 changes: 2 additions & 2 deletions docs/design/features/globalization-hybrid-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Hybrid has higher priority than sharding or custom modes, described in globaliza

**SortKey**

In HybridGlobalization mode Invariant way of SortKey calculation is used. From this reason, the following APIs will work in the same way as they do when `Invariant=true`:

Affected public APIs:
- System.Globalization.CompareInfo.GetSortKey
- System.Globalization.CompareInfo.GetSortKeyLength
Expand All @@ -43,8 +45,6 @@ Indirectly affected APIs (the list might not be complete):
- System.Net.Mail.MailAddress.GetHashCode
- System.Xml.Xsl.XslCompiledTransform.Transform

Web API does not have an equivalent, so they throw `PlatformNotSupportedException`.

**Case change**

Affected public APIs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1451,8 +1451,9 @@ private SortKey CreateSortKeyCore(string source, CompareOptions options) =>
GlobalizationMode.UseNls ?
NlsCreateSortKey(source, options) :
#if TARGET_BROWSER
// JS cannot create locale-sensitive sort key, use invaraint functions instead.
GlobalizationMode.Hybrid ?
throw new PlatformNotSupportedException(GetPNSEText("SortKey")) :
InvariantCreateSortKey(source, options) :
#endif
IcuCreateSortKey(source, options);

Expand Down