After the Windows10 anniversary update i have a stange problem with CultureInfo and NumberFormat (specially with the NumberGroupSeparator).
This sample app shows the problem (My system language is de-at):
private static void Main(string[] args)
{
foreach (var cultureInfo1 in CultureInfo.GetCultures(CultureTypes.AllCultures))
{
var cultureInfo2 = CultureInfo.GetCultureInfo(cultureInfo1.Name);
if (cultureInfo1.NumberFormat.NumberGroupSeparator != cultureInfo2.NumberFormat.NumberGroupSeparator)
Console.WriteLine(
$"{cultureInfo1.Name}: {cultureInfo1.NumberFormat.NumberGroupSeparator} != {cultureInfo2.NumberFormat.NumberGroupSeparator}");
}
Console.WriteLine("finished");
}
Output before Update:
finished
Output after Windows10 anniversary update:
de-AT: . !=
finished
The problem is, that we use in our code the method GetCultureInfo(...) and on every system with the new Win10 update our csv importer doesn't work because the group separator is wrong.
I tried this sample application on different systems with and without the update. Even with the same result.
Can anyone explain this?