-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[iOS][non-icu] HybridGlobalization support IgnoreKanaType #96002
Conversation
Tagging subscribers to this area: @dotnet/area-system-globalization Issue DetailsSupport IgnoreKanaType by using Contributes to #80689
|
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos Issue DetailsSupport IgnoreKanaType by using Contributes to #80689
|
/azp run runtime-maccatalyst |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-ioslikesimulator |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-ioslike |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-ioslikesimulator |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -536,15 +523,15 @@ public void TestIgnoreKanaAndWidthCases() | |||
|
|||
// Edge case of the Ignore Width. | |||
Assert.False(string.Compare("\u3162\u3163", "\uFFDB\uFFDC", CultureInfo.InvariantCulture, CompareOptions.None) == 0, $"Expect '0x3162 0x3163' != '0xFFDB 0xFFDC'"); | |||
if (!PlatformDetection.IsHybridGlobalizationOnBrowser) | |||
if (!PlatformDetection.IsHybridGlobalizationOnBrowser && !PlatformDetection.IsHybridGlobalizationOnOSX) |
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.
we could probably simplify this if to IsHybridGlobalization
right?
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.
yes, thanks.
Assert.True(string.Compare("\u3162\u3163", "\uFFDB\uFFDC", CultureInfo.InvariantCulture, CompareOptions.IgnoreWidth) == 0, "Expect '0x3162 0x3163' == '0xFFDB 0xFFDC'"); | ||
|
||
const char hiraganaStart = '\u3041'; | ||
const char hiraganaEnd = '\u3096'; | ||
const int hiraganaToKatakanaOffset = 0x30a1 - 0x3041; | ||
|
||
// in HybridGlobalization on Browser IgnoreKanaType is supported only for "ja-JP" | ||
CultureInfo ignoreKanaTypeTestedCulture = PlatformDetection.IsHybridGlobalizationOnBrowser ? new CultureInfo("ja-JP") : CultureInfo.InvariantCulture; | ||
CultureInfo ignoreKanaTypeTestedCulture = PlatformDetection.IsHybridGlobalization ? new CultureInfo("ja-JP") : CultureInfo.InvariantCulture; |
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.
is this change required? according to the comment we only need to use ja-JP on browser
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.
It is, as this test case fails when using InvariantCulture
on iOS
also. But for iOS IgnoreKanaType
is supported in other cultures, there are other test cases that pass.
I will add comment for iOS that this particular test case is behaving different.
/azp run runtime-ioslikesimulator |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-ioslike |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-maccatalyst |
Azure Pipelines successfully started running 1 pipeline(s). |
Failures are not related. |
Support IgnoreKanaType by using
kCFStringTransformHiraganaKatakana
.Enable all test cases related to IgnoreKanaType on iOS.
Contributes to #80689
cc @SamMonoRT