System.Text.Encoding.CodePages (8.0.0)

Published 2026-11-23 16:56:32 +00:00 by demo-admin

Installation

dotnet nuget add source --name demo-admin --username your_username --password your_token 
dotnet add package --source demo-admin --version 8.0.0 System.Text.Encoding.CodePages

About this package

Provides support for code-page based encodings, including Windows-1252, Shift-JIS, and GB2312.

Commonly Used Types: System.Text.CodePagesEncodingProvider

About

System.Text.Encoding.CodePages enable creating single and double bytes encodings for code pages that otherwise are available only in the desktop .NET Framework.

Key Features

  • Support single and double byte encodings for code pages that are not available in .NET Core.

How to Use

using System.Text;

// Register the CodePages encoding provider at application startup to enable using single and double byte encodings.
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

// Now can create single and double byte encodings for code pages that are not available in .NET Core.
Encoding windows1252Encoding = Encoding.GetEncoding(1252); // Western European (Windows)
byte[] encodedBytes = windows1252Encoding.GetBytes("String to encode");

Main Types

The main types provided by this library are:

  • CodePagesEncodingProvider

Additional Documentation

Feedback & Contributing

System.Text.Encoding.CodePages is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Dependencies

ID Version Target Framework
System.Memory 4.5.5 .NETFramework4.6.2
System.Runtime.CompilerServices.Unsafe 6.0.0 .NETFramework4.6.2
System.Memory 4.5.5 .NETStandard2.0
System.Runtime.CompilerServices.Unsafe 6.0.0 .NETStandard2.0
System.Runtime.CompilerServices.Unsafe 6.0.0 net6.0
Details
NuGet
2026-11-23 16:56:32 +00:00
1
Microsoft
4.1 MiB
Assets (2)
Versions (3) View all
8.0.0 2026-11-23
4.5.1 2026-11-23
6.0.0 2026-11-23