From 9d4d972c0cc2681d4dfc0aafbfb30468ddc0c5fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Mar 2026 15:42:31 +0000 Subject: [PATCH 1/2] Initial plan From cc6470a8a09a392f190cc6c1777cd54d24549194 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Mar 2026 15:45:16 +0000 Subject: [PATCH 2/2] Add IdnMapping.GetAscii IDN example to globalization breaking change article Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../globalization/5.0/icu-globalization-api.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/core/compatibility/globalization/5.0/icu-globalization-api.md b/docs/core/compatibility/globalization/5.0/icu-globalization-api.md index 6d1a2f266c37a..35a6d639f0aa7 100644 --- a/docs/core/compatibility/globalization/5.0/icu-globalization-api.md +++ b/docs/core/compatibility/globalization/5.0/icu-globalization-api.md @@ -1,7 +1,8 @@ --- title: "Breaking change: Globalization APIs use ICU libraries on Windows 10" description: Learn about the globalization breaking change in .NET 5 where ICU libraries are used for globalization functionality instead of NLS on Windows 10. -ms.date: 02/15/2022 +ms.date: 03/10/2026 +ai-usage: ai-assisted --- # Globalization APIs use ICU libraries on Windows 10 @@ -52,6 +53,21 @@ string text = string.Format("{0:C}", 100); - In .NET Core 3.1 and earlier versions on Windows, the value of text is `"100,00 €"`. - In .NET 5 and later versions on Windows 19H1 and later versions, the value of text is `"100,00 ¤"`, which uses the international currency symbol instead of the euro. In ICU, the design is that a currency is a property of a country or region, not a language. +### IdnMapping.GetAscii + +Consider the following code that calls to convert an internationalized domain name label to its ASCII-compatible encoding. + +```csharp +var mapping = new System.Globalization.IdnMapping(); +string asciiName = mapping.GetAscii("ABCDEFG"); +Console.WriteLine(asciiName); +``` + +- In .NET Core 3.1 and earlier versions on Windows, the snippet prints `ABCDEFG`. +- In .NET 5 and later versions on Windows 10 May 2019 Update and later versions, the snippet prints `abcdefg`. + +ICU lowercases domain name labels as part of the ASCII-compatible encoding process. NLS doesn't lowercase labels that contain no international characters, so the original casing is preserved. + ### Day-of-week abbreviations The method obtains the shortest abbreviated day name for a specified day of the week.