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

[HybridGlobalization] Pass non-breaking space / narrow non-breaking space characters #103226

Merged
merged 6 commits into from
Jun 18, 2024

Conversation

mkhamoyan
Copy link
Contributor

@mkhamoyan mkhamoyan commented Jun 10, 2024

In recent ICU versions they introduced a change where regular spaces are replaced with non-breaking spaces (NBSP / \u00A0) or narrow non-breaking spaces (NNBSP / \u202F). For more details, see the related ICU change.

With this PR, in HybridGlobalization mode for both Apple platforms and Browser, we will pass 'NO-BREAK SPACE' (U+00A0) and 'NARROW NO-BREAK SPACE' (U+202F) as they are, instead of converting them to regular spaces, to maintain consistency across all platforms (see).

For more info check discussion under #83571

Fixes #102250

Copy link
Contributor

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

@mkhamoyan
Copy link
Contributor Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst,runtime-wasm

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@mkhamoyan
Copy link
Contributor Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst,runtime-wasm

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@mkhamoyan mkhamoyan changed the title [HybridGlobalization] Convert narrow no-break spaces to spaces [HybridGlobalization] Pass non-breaking space character Jun 11, 2024
@mkhamoyan mkhamoyan changed the title [HybridGlobalization] Pass non-breaking space character [HybridGlobalization] Pass non-breaking space / narrow non-breaking spaces characters Jun 11, 2024
@mkhamoyan mkhamoyan changed the title [HybridGlobalization] Pass non-breaking space / narrow non-breaking spaces characters [HybridGlobalization] Pass non-breaking space / narrow non-breaking space characters Jun 11, 2024
@mkhamoyan
Copy link
Contributor Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst,runtime-wasm

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@mkhamoyan
Copy link
Contributor Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst,runtime-wasm

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

Copy link
Member

@ilonatommy ilonatommy left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

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

Modulo my comments and question, LGTM.

@mkhamoyan
Copy link
Contributor Author

/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@matouskozak matouskozak left a comment

Choose a reason for hiding this comment

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

LGTM! Good job with reducing the iOS CultureData code and using the ICU one instead.

@mkhamoyan
Copy link
Contributor Author

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/9560514583

Copy link
Contributor

@mkhamoyan backporting to release/8.0-staging failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: convert narrow no-break spaces to spaces too
Using index info to reconstruct a base tree...
M	src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
M	src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Unix.cs
M	src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
M	src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.iOS.cs
A	src/libraries/System.Runtime/tests/System.Globalization.Tests/DateTimeFormatInfo/DateTimeFormatInfoLongTimePattern.cs
A	src/libraries/System.Runtime/tests/System.Globalization.Tests/DateTimeFormatInfo/DateTimeFormatInfoShortTimePattern.cs
A	src/mono/browser/runtime/hybrid-globalization/helpers.ts
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): src/mono/browser/runtime/hybrid-globalization/helpers.ts deleted in HEAD and modified in convert narrow no-break spaces to spaces too. Version convert narrow no-break spaces to spaces too of src/mono/browser/runtime/hybrid-globalization/helpers.ts left in tree.
Auto-merging src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.iOS.cs
CONFLICT (content): Merge conflict in src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.iOS.cs
Auto-merging src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
CONFLICT (content): Merge conflict in src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
Auto-merging src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Unix.cs
Auto-merging src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Icu.cs
Auto-merging src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoShortTimePattern.cs
Auto-merging src/libraries/System.Globalization/tests/DateTimeFormatInfo/DateTimeFormatInfoLongTimePattern.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 convert narrow no-break spaces to spaces too
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@mkhamoyan an error occurred while backporting to release/8.0-staging, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

mkhamoyan added a commit to mkhamoyan/runtime that referenced this pull request Jun 18, 2024
mkhamoyan added a commit that referenced this pull request Jun 25, 2024
…narrow non-breaking space characters (#103647)

* Backport of #103226 to release/8.0-staging
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Globalization os-browser Browser variant of arch-wasm os-ios Apple iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iOS/HybridGlobalization] No space between time and AM/PM designator
4 participants