Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Encoding::RegisterProvider Method (EncodingProvider^)

.NET Framework (current version)
 

Registers an encoding provider.

Namespace:   System.Text
Assembly:  mscorlib (in mscorlib.dll)

public:
[SecurityCriticalAttribute]
static void RegisterProvider(
	EncodingProvider^ provider
)

Parameters

provider
Type: System.Text::EncodingProvider^

A subclass of EncodingProvider that provides access to additional character encodings.

Exception Condition
ArgumentNullException

provider is null.

The RegisterProvider method allows you to register a class derived from EncodingProvider that makes character encodings available on a platform that does not otherwise support them. Once the encoding provider is registered, the encodings that it supports can be retrieved by calling any Encoding::GetEncoding overload.

.NET Framework 4.6 includes one encoding provider, CodePagesEncodingProvider, that makes the encodings available that are present in the full .NET Framework but are not available in .NET Framework 4.6. By default, .NET Framework 4.6 only supports the Unicode encodings, ASCII, and code page 28591.

If the same encoding provider is used in multiple calls to the RegisterProvider method, only the first method call registers the provider. Subsequent calls are ignored.

If the RegisterProvider method is called to register multiple providers that handle the same encoding, the last registered provider is the used for all encoding and decoding operations. Any previously registered providers are ignored.

Universal Windows Platform
Available since 10
.NET Framework
Available since 4.6
Return to top
Show:
© 2017 Microsoft