Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Text.​EncodingProvider

Assembly: System.Runtime

Inheritance: object → EncodingProvider

Provides the base class for an encoding provider, which supplies encodings that are unavailable on a particular platform.

Methods

public Encoding
GetEncoding​(int codepage)
codepage The code page identifier of the requested encoding.
Returns The encoding that is associated with the specified code page, or <see langword="null" /> if this <see cref="T:System.Text.EncodingProvider" /> cannot return a valid encoding that corresponds to <paramref name="codepage" /> .
Returns the encoding associated with the specified code page identifier.
public Encoding
GetEncoding​(int codepage, EncoderFallback encoderFallback, DecoderFallback decoderFallback)
codepage The code page identifier of the requested encoding.
encoderFallback An object that provides an error-handling procedure when a character cannot be encoded with this encoding.
decoderFallback An object that provides an error-handling procedure when a byte sequence cannot be decoded with this encoding.
Returns The encoding that is associated with the specified code page, or <see langword="null" /> if this <see cref="T:System.Text.EncodingProvider" /> cannot return a valid encoding that corresponds to <paramref name="codepage" /> .
Returns the encoding associated with the specified code page identifier. Parameters specify an error handler for characters that cannot be encoded and byte sequences that cannot be decoded.
public Encoding
GetEncoding​(string name)
name The name of the requested encoding.
Returns The encoding that is associated with the specified name, or <see langword="null" /> if this <see cref="T:System.Text.EncodingProvider" /> cannot return a valid encoding that corresponds to <paramref name="name" /> .
Returns the encoding with the specified name.
public Encoding
GetEncoding​(string name, EncoderFallback encoderFallback, DecoderFallback decoderFallback)
name The name of the preferred encoding.
encoderFallback An object that provides an error-handling procedure when a character cannot be encoded with this encoding.
decoderFallback An object that provides an error-handling procedure when a byte sequence cannot be decoded with the current encoding.
Returns The encoding that is associated with the specified name, or <see langword="null" /> if this <see cref="T:System.Text.EncodingProvider" /> cannot return a valid encoding that corresponds to <paramref name="name" /> .
Returns the encoding associated with the specified name. Parameters specify an error handler for characters that cannot be encoded and byte sequences that cannot be decoded.
GetEncodings​()
Returns An array that contains all the supported encodings.
Returns an array that contains all the encodings that are supported by the <see cref="T:System.Text.EncodingProvider" /> .
public bool
Equals​(object obj)
Inherited from object
obj The object to compare with the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
Determines whether the specified object is equal to the current object.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public int
GetHashCode​()
Inherited from object
Returns A hash code for the current object.
Serves as the default hash function.
public Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .
public string
ToString​()
Inherited from object
Returns A string that represents the current object.
Returns a string that represents the current object.