Skip to content

Wrong result from CultureInfo.CurrentCulture.Name in iOS #110680

Closed

Description

@rolfbjarne

From @vsfeedback on Thu, 12 Dec 2024 18:36:52 GMT

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work] [regression] [worked-in:17.12.0]

Put this in a Maui app:
Debug.WriteLine($"CultureInfo.CurrentCulture.Name: {CultureInfo.CurrentCulture.Name}");

In iOs is the result: en (wrong)
In Android and Windows is the result: en-US (correct)

In .NET 8 was the result correct for iOS.

Visual Studio 17.12.0
.NET 9
Microsoft.Maui.Controls Version 9.0.10


Original Comments

Feedback Bot on 11/18/2024, 11:33 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Geert Geerits on 11/20/2024, 03:17 AM:

Link to the repository: https://github.com/geertgeerits/MauiBugCurrentCulture

I like to change the severity to: I’m unable to use this version
I need the country code to retrieve the ISOCurrencySymbol for that country.

Copied from original issue dotnet/macios#21806

Activity

  1. dotnet-policy-service commented on Dec 13, 2024

    @dotnet-policy-service
    Contributor

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

  2. dotnet-policy-service commented on Dec 13, 2024

    @dotnet-policy-service
    Contributor

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

  3. tarekgh commented on Dec 13, 2024

    @tarekgh
    Member

    @matouskozak please have a look.

    CC @vitek-karas

  4. removed
    untriagedNew issue has not been triaged by the area owner
    on Dec 13, 2024
  5. self-assigned this
    on Dec 13, 2024
  6. added this to the 10.0.0 milestone on Dec 13, 2024
  7. matouskozak commented on Dec 13, 2024

    @matouskozak
    Member

    Related to #108958 (comment). We will investigate.

  8. matouskozak commented on Mar 17, 2025

    @matouskozak
    Member

    I just tested the newly released .NET 9.0.3 https://github.com/dotnet/core/blob/main/release-notes/9.0/9.0.3/9.0.3.md?WT.mc_id=dotnet-35129-website and the retrieved default CurrentCulture contains the region information now.

    Closing the issue as completed. Please reach out if the issue persists.

  9. locked and limited conversation to collaborators on Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions