DecoderFallbackBuffer Class

Passes a string to a decoding operation that is emitted instead of an output character because an input byte sequence cannot be decoded.

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

public abstract class DecoderFallbackBuffer
public abstract class DecoderFallbackBuffer
public abstract class DecoderFallbackBuffer
Not applicable.

An encoding defines a mapping between a Unicode character and an encoded sequence of bytes. However, an encoding operation, which converts an input character to an output byte sequence, or a decoding operation, which converts an input byte sequence to an output character, fails if no mapping is defined for a particular character.

The .NET Framework provides a conversion failure-handling mechanism, called a fallback, if a conversion cannot be performed. All decoder fallbacks must implement a decoder fallback buffer, represented by a type derived from the DecoderFallbackBuffer class, that can pass a string to the conversion operation.

Fallbacks can employ different strategies for handling conversion failures. The fallback buffer for a decoder replacement fallback, for example, emits a substitute output string if an input byte sequence cannot be decoded. A fallback buffer is required even if the strategy implemented by a particular fallback does not require the emitting of data. For example, the fallback buffer for an encoder or decoder exception fallback is not used because the fallback throws an exception instead of producing output.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions