镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Reesult of ToString("C") is incomatible in Blazor WebAssembly #47068

Closed

Description

@vsfeedback

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


In ja-JP culture of .NET F/W and . NET5 in desktop, 123.ToString("C") is "\123", but in Blazor WebAssembly, 123.ToString("C") is "¥123".

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ja-JP");
Console.WriteLine(123.ToString("C"));


Original Comments

Feedback Bot on 1/10/2021, 07:23 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.


Original Solutions

(no solutions)

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jan 15, 2021
  2. mkArtakMSFT commented on Jan 15, 2021

    @mkArtakMSFT

    @lewing FYI.

  3. tarekgh commented on Jan 15, 2021

    @tarekgh
    Member

    In ja-JP culture of .NET F/W and . NET5 in desktop, 123.ToString("C") is "\123", but in Blazor WebAssembly, 123.ToString("C") is "¥123".

    I assume this is flipped statement. I am seeing .NET 5.0 is successfully returning ¥123 which is the expected result.

  4. lewing commented on Jan 19, 2021

    @lewing
    Member

    @tarekgh yeah I assume it was just reversed in the explanation.

    This looks like is is probably an example of loading in a specific culture that doesn't exist in the default icu data. I think following the instructions at https://docs.microsoft.com/en-us/aspnet/core/blazor/globalization-localization?view=aspnetcore-5.0#blazor-webassembly

    @tqiu8 can you add this to the work you're doing to fail when trying to load an unsupported culture.

  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 20, 2021
  6. added this to the 6.0.0 milestone on Jan 20, 2021
  7. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jan 21, 2021
  8. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jan 25, 2021
  9. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jan 25, 2021
  10. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Mar 10, 2021
  11. ghost locked as resolved and limited conversation to collaborators on Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions