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

CultureInfo.TextInfo.IsRightToLeft returns false for Uyghur culture in Blazor WebAssembly #110015

Closed
1 task done
abduwaris opened this issue Nov 20, 2024 · 7 comments
Closed
1 task done
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Globalization needs-author-action An issue or pull request that requires more info or actions from the author.

Comments

@abduwaris
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have encountered an issue with the CultureInfo.TextInfo.IsRightToLeft property in Blazor WebAssembly. Specifically, when using the Uyghur culture (ug-CN), the IsRightToLeft property returns false, which is not the expected behavior since Uyghur is a right-to-left language.

In Blazor WebAssembly, the following code snippet returns false:

@page "/text-direction"

@using System.Globalization

<div>
    @if (ugCulture.TextInfo.IsRightToLeft)
    {
        <p>The text direction is set to Right-To-Left.</p>
    }
    else
    {
        <p>The text direction is set to Left-To-Right.</p>
    }
</div>

@code {
    private CultureInfo ugCulture;

    protected override void OnInitialized()
    {
        ugCulture = new CultureInfo("ug-CN");
    }
}

This behavior may affect the rendering of Uyghur text in Blazor applications, as proper text direction is crucial for correct display and user experience.

If there is a known workaround or if this behavior is expected, please let me know. Otherwise, I would appreciate any guidance on how this issue might be addressed in future updates.

Thank you!

Expected Behavior

For the Uyghur culture (ug-CN), I expect the TextInfo.IsRightToLeft property to return true.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

9.0.100

Anything else?

No response

@javiercn javiercn transferred this issue from dotnet/aspnetcore Nov 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 20, 2024
Copy link
Contributor

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

@tarekgh tarekgh added the arch-wasm WebAssembly architecture label Nov 21, 2024
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@tarekgh
Copy link
Member

tarekgh commented Nov 21, 2024

@ilonatommy

@ilonatommy ilonatommy self-assigned this Nov 25, 2024
@ilonatommy
Copy link
Member

ug-CN is not a supported culture in WASM apps by default. It is same issue as e.g. #104717. You can prepare ICU data for your app by adding ug_CN to filters and build it from source, then replace the default icu data, following the instructions from https://github.com/dotnet/runtime/blob/ca0011a9698ec113535b710285bdda942ec5bd2b/docs/design/features/globalization-icu-wasm.md#custom-icu

@ilonatommy ilonatommy added the needs-author-action An issue or pull request that requires more info or actions from the author. label Nov 28, 2024
@ilonatommy ilonatommy added this to the 10.0.0 milestone Nov 28, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Nov 28, 2024
Copy link
Contributor

This issue has been marked needs-author-action and may be missing some important information.

Copy link
Contributor

This issue has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@pavelsavara pavelsavara modified the milestones: 10.0.0, Future Dec 12, 2024
Copy link
Contributor

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

@dotnet-policy-service dotnet-policy-service bot removed this from the Future milestone Dec 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Globalization needs-author-action An issue or pull request that requires more info or actions from the author.
Projects
None yet
Development

No branches or pull requests

4 participants