-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.GlobalizationenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions
Milestone
Description
On a Windows 10 system using a customized locale, TwoLetterISORegionName returns "150". (RegionInfo also becomes unreliable for ascertaining accurate geographic region information, as needed for, say, GDPR purposes.)
Environment
Windows 10 Version 1909 (18363.657) or Windows 10 Version 2004 (19569.1000) (pre-release)
.NET Framework 4.6.2 or .NET Core 3.1
Country: Netherlands
Regional format: English (Europe)
Short time: HH:mm tt
Long time: HH:mm:ss tt
Samples
.NET Framework BCL (sample1.cs)
using System;
using System.IO;
using System.Globalization;
class A
{
static void Main(string[] args)
{
Console.WriteLine(RegionInfo.CurrentRegion.TwoLetterISORegionName);
}
}C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /out:sample1.exe sample1.cs- Execute
sample1.exe - Observe
150output
WinRT (sample2.cs)
using System;
using System.IO;
class A
{
static void Main(string[] args)
{
Console.WriteLine(new Windows.Globalization.GeographicRegion().CodeTwoLetter);
}
}C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /out:sample2.exe /reference:"C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd" /reference:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Runtime.dll" sample2.cs- Execute
sample2.exe - Observe
NLoutput
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.GlobalizationenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions