Skip to content
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

[browser][non-icu] HybridGlobalization normalization unblocking APIs that became supported. #86694

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
10 changes: 10 additions & 0 deletions docs/design/features/hybrid-globalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,13 @@ Using `IgnoreNonSpace` for these two with `HybridGlobalization` off, also return
``` C#
new CultureInfo("de-DE").CompareInfo.IndexOf("strasse", "stra\u00DFe", 0, CompareOptions.IgnoreNonSpace); // 0 or -1
```

**Normalization**

In HybridGlobalization all normalization types are available:
- `FormC`,
- `FormD`,
- `FormKC`,
- `FormKD`.

This means, that `FormKC` and `FormKD` do not throw `PlatfromNotSupportedException`, as it happens in non-hybrid mode on Browser.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private static void ValidateArguments(string strInput, NormalizationForm normali
Debug.Assert(strInput != null);


if (OperatingSystem.IsBrowser() && (normalizationForm == NormalizationForm.FormKC || normalizationForm == NormalizationForm.FormKD))
if (!GlobalizationMode.Hybrid && OperatingSystem.IsBrowser() && (normalizationForm == NormalizationForm.FormKC || normalizationForm == NormalizationForm.FormKD))
{
// Browser's ICU doesn't contain data needed for FormKC and FormKD
throw new PlatformNotSupportedException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ public enum NormalizationForm
{
FormC = 1,
FormD = 2,
[UnsupportedOSPlatform("browser")]
FormKC = 5,
[UnsupportedOSPlatform("browser")]
FormKD = 6
}
}