Skip to content

Setting CultureInfo in Startup gives unicode minussign U+2212 in swedish locale #44678

@johanskoldekrans

Description

@johanskoldekrans

`var ci = new CultureInfo("sv-SE") {DateTimeFormat = {ShortDatePattern = "yyyy-MM-dd"} };

        app.UseRequestLocalization(
            new RequestLocalizationOptions()
            {
                SupportedCultures = new List<CultureInfo> { ci },
                SupportedUICultures = new List<CultureInfo> { ci },
                DefaultRequestCulture = new RequestCulture(ci)
            });`

We have this in startup/configure to make sure that the culture is set to swedish in the UI. and it has worked up until we upgraded to .Net 5. Now I have to add NumberFormat = { NegativeSign="-" } to stop it from returning Ascii 8722 as the negative sign.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions