Skip to content

LC_MONETARY locale file settings are not respected when using CultureInfo.CreateSpecificCulture under Linux #115941

Closed as not planned
@NikolayYakov

Description

@NikolayYakov

Description

I'm trying to use CreateSpecificCulture() in .NET, which should respect the culture overrides of the local machine, as stated in the official documentation. This works correctly on Windows, but I can't seem to get the expected behavior on Linux (using WSL with Ubuntu 22.04.2 LTS).

Specifically, I want the NumberFormat.CurrencyNegativePattern property to reflect the system locale settings. I came across the n_sign_posn property, which appears to represent this value, but modifying it had no effect.

I'm unsure whether this is a bug, if I'm referencing the wrong Linux property, or if this behavior is intentional under Linux. I'd appreciate any insights, tips, or possible workarounds to achieve the desired outcome.

Reproduction Steps

.NET Application ran under Linux with modified locale culture files.

Expected behavior

CurrencyNegativePattern to respect the n_sign_posn value

Actual behavior

CurrencyNegativePattern does not take into account n_sign_posn value

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions