EncodingStatic: Convert |
Converts a set of bytes from one encoding to another encoding.
Public Function Convert( ByVal SrcEncoding As Encoding, ByVal DstEncoding As Encoding, ByRef Bytes ( ) As Byte, Optional ByRef Index As Variant, Optional ByRef Count As Variant ) As Byte ( )
Exception | Condition |
---|---|
ArgumentNullException | SrcEncoding is Nothing. -or- DstEncoding is Nothing. -or- Bytes is uninitialized. |
ArgumentOutOfRangeException | Index and Count do not specify a valid range in the byte array. |
DecoderFallbackException | A fallback occurred -and- SrcEncoding.DecoderFallback is set to DecoderExceptionFallback. |
EncoderFallbackException | A fallback occurred -and- DstEncoding.EncoderFallback is set to EncoderExceptionFallback. |