Skip to content

[iOS][non-icu] HybridGlobalization support IgnoreKanaType - #96002

Merged
mkhamoyan merged 7 commits into
dotnet:mainfrom
mkhamoyan:hybrid_ignorekanatype
Dec 15, 2023
Merged

mkhamoyan merged 7 commits into
dotnet:mainfrom
mkhamoyan:hybrid_ignorekanatype

Conversation

@mkhamoyan

@mkhamoyan mkhamoyan commented Dec 14, 2023 •

Copy link
Copy Markdown
Contributor

Support IgnoreKanaType by using kCFStringTransformHiraganaKatakana.
Enable all test cases related to IgnoreKanaType on iOS.

Contributes to #80689

cc @SamMonoRT

@mkhamoyan mkhamoyan self-assigned this Dec 14, 2023
@ghost

ghost commented Dec 14, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

Issue Details

Support IgnoreKanaType by using kCFStringTransformHiraganaKatakana.

Contributes to #80689

Author: mkhamoyan
Assignees: mkhamoyan
Labels:

area-System.Globalization

Milestone: -

@mkhamoyan mkhamoyan added the os-ios Apple iOS label Dec 14, 2023
@ghost

ghost commented Dec 14, 2023

Copy link
Copy Markdown

Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

Support IgnoreKanaType by using kCFStringTransformHiraganaKatakana.

Contributes to #80689

Author: mkhamoyan
Assignees: mkhamoyan
Labels:

area-System.Globalization, os-ios

Milestone: -

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

/azp run runtime-maccatalyst

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

/azp run runtime-ioslikesimulator

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

/azp run runtime-ioslike

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

/azp run runtime-ioslikesimulator

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

// 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)

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks.


// 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;

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Contributor Author

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.

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

/azp run runtime-ioslikesimulator

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

/azp run runtime-ioslike

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

/azp run runtime-maccatalyst

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mkhamoyan

Copy link
Copy Markdown
Contributor Author

Failures are not related.

@mkhamoyan
mkhamoyan merged commit 2987aba into dotnet:main Dec 15, 2023
@mkhamoyan
mkhamoyan deleted the hybrid_ignorekanatype branch December 15, 2023 10:04
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants