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.

CodePagesEncodingProvider::Instance Property

 

Gets an encoding provider for code pages supported in the desktop .NET Framework but not in the current .NET Framework platform.

Namespace:   System.Text
Assembly:  System.Text.Encoding.CodePages (in System.Text.Encoding.CodePages.dll)

public:
property EncodingProvider^ Instance {
	static EncodingProvider^ get();
}

Property Value

Type: System.Text::EncodingProvider^

An encoding provider that allows access to encodings not supported on the current .NET Framework platform.

The Instance property returns an EncodingProvider object that makes encodings available to apps that target the .NET Framework 4.6 or a later version and that otherwise are available only in the .NET Framework on the Windows desktop.

The .NET Framework on the Windows desktop supports a large number of character encodings and code pages. You can get a complete list of encodings by calling the Encoding::GetEncodings method, which is available in the full .NET Framework on the Windows desktop. .NET Native for UWP apps, on the other hand, supports only the following encodings by default:

  • ASCII (code page 20127), which is returned by the Encoding::ASCII property.

  • ISO-8859-1 (code page 28591).

  • UTF-7 (code page 65000), which is returned by the Encoding::UTF7 property.

  • UTF-8 (code page 65001), which is returned by the Encoding::UTF8 property.

  • UTF-16 and UTF-16LE (code page 1200), which is returned by the Encoding::Unicode property.

  • UTF-16BE (code page 1201), which is instantiated by calling the UnicodeEncoding::UnicodeEncoding or UnicodeEncoding::UnicodeEncoding constructor with a bigEndian value of true.

  • UTF-32 and UTF-32LE (code page 12000), which is returned by the Encoding::UTF32 property.

  • UTF-32BE (code page 12001), which is instantiated by calling an UTF32Encoding constructor that has a bigEndian parameter and providing a value of true in the method call.

To retrieve an encoding that is present in the .NET Framework on the Windows desktop but not in UWP apps, you do the following:

Universal Windows Platform
Available since 10
Return to top
Show:
© 2017 Microsoft