EncoderReplacementFallbackBuffer: Fallback

Fallback

Indicates whether a replacement string can be used when an input surrogate pair cannot be encoded, or whether the surrogate pair can be ignored. Parameters specify the surrogate pair and the index position of the pair in the input.



 Public Function Fallback(
	  ByVal UnknownCharOrHighSurrogate As Long,
	  Optional ByRef UnknownLowSurrogate As Variant,
	  Optional ByVal Index As Long ) As Boolean

Parameters

UnknownCharOrHighSurrogate
[ByVal] Long. The high surrogate of the input pair.
UnknownLowSurrogate
[ByRef] Optional. Variant. The low surrogate of the input pair.
Index
[ByVal] Optional. Long. The index position of the surrogate pair in the input buffer.

Return Values

Boolean -  True if the replacement string is not empty; False if the replacement string is empty.

Remarks

The GetBytes and Convert methods call Fallback if they encounter an unknown character in their input. If the return value of Fallback is True, the calling method can invoke the GetNextChar method to obtain each character in the replacement fallback buffer.

Exceptions

Exception Condition
ArgumentExceptionThis method is called again before the GetNextChar method has read all the replacement string characters.
ArgumentOutOfRangeException The value of CharUnknownHigh is less than U+D800 or greater than U+D8FF.
-or-
The value of CharUnknownLow is less than U+DC00 or greater than U+DFFF.

See Also

Project CorLib Overview

Class EncoderReplacementFallbackBuffer Overview