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

Thousand separator issue in fr-FR culture in .Net 8 on Windows 2022 #11469

Open
3 of 16 tasks
GTechene opened this issue Jan 25, 2025 · 1 comment
Open
3 of 16 tasks

Thousand separator issue in fr-FR culture in .Net 8 on Windows 2022 #11469

GTechene opened this issue Jan 25, 2025 · 1 comment

Comments

@GTechene
Copy link

Description

When running a simple test involving the thousand separator in fr-FR culture in .Net 8 on Windows 2022 build agent, it fails. The same test performed locally (Windows 11) or on an Ubuntu build agent works fine. I haven't tested on other versions of Windows.

The test fails because the thousand separator for French numbers in .Net is supposed to be the U+202F character (narrow no-break space) but on Windows 2022 build agent this character is inexplicably replaced with a regular space (i.e. U+0020). If you copy/paste the logs you get :

Expected: "1 000 €"
But was:  "1 000 €"

The space beween "1" and "0" on the Expected line is actually U+202F while the other one is U+0020. Hence the failing test.

Is it some kind of config issue for the .Net Framework that is installed on the image ? Or the culture specs in the OS (e.g. regional settings in registry) ?

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Version: 20250120.2.0

Failed build : https://github.com/GTechene/VerifyThousandSeparator/actions/runs/12966472782/job/36167269110
Reproducible at will with this image version.

Is it regression?

Possibly, I do not know.

Expected behavior

The following .Net test should pass on all build agents :

using NUnit.Framework;

namespace VerifyThousandSeparator;

public class TestClass
{
    [Test]
    [SetCulture("fr-FR")]
    public void Should_not_fail_with_basic_assert()
    {
        const decimal input = 1000.31m;
        Assert.That($"{input:C0}", Is.EqualTo("1\u202f000 €"));
    }
}

Please find a complete project at https://github.com/GTechene/VerifyThousandSeparator

Actual behavior

The test fails only on Windows 2022 build agent, not locally (Windows 11) or Ubuntu 24.04 build agent.

Please find a complete project at https://github.com/GTechene/VerifyThousandSeparator

Repro steps

Run the windows workflow that can be found at https://github.com/GTechene/VerifyThousandSeparator/actions

@RaviAkshintala
Copy link
Contributor

Hi @GTechene Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants