Training
Module
Format alphanumeric data for presentation in C# - Training
Explore basic methods in C# to format alphanumeric data.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The bug mentioned in the CLI console output uses UTF-8 breaking change, where the .NET SDK changed the encoding of the entire console, has been fixed. The console encoding no longer remains UTF-8 after the .NET SDK executes a command. It's possible that users came to rely on that behavior, hence this is a breaking change.
In addition, the .NET SDK no longer changes the encoding to UTF-8 on older Windows 10 versions that don't fully support it.
dotnet build
.7.0.3xx .NET 8 Preview 3
This change can affect binary compatibility. It's also a behavioral change.
There was an existing bug where the .NET SDK affected the encoding on the console for other programs. That was a bug that was fixed, resulting in this breaking change.
Older versions of Windows 10 (that is, versions before the November 2019 update) didn't support UTF-8, so the default behavior shouldn't be to use UTF-8 encoding. Instead, an opt-in is now available.
If your app needs to change the code page on Windows, it can run a process to invoke the chcp
command. Your app shouldn't rely on the .NET SDK to change the encoding.
For older Windows 10 versions that don't officially support UTF-8 where you want the .NET SDK to continue to change the encoding to UTF-8 for non-English languages, can you set the environment variable DOTNET_CLI_FORCE_UTF8_ENCODING
to true
or 1.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Training
Module
Format alphanumeric data for presentation in C# - Training
Explore basic methods in C# to format alphanumeric data.