UnicodeEncoding: GetDecoder |
Returns a decoder that maintains state.
Public Function GetDecoder ( ) As Decoder
Unlike UnicodeEncoding, the decoder maintains state between decoding calls. Since a single unicode character required exactly 2 bytes to be decoded, it is possible that an odd number of bytes may be attempted to be decoding, creating an orphaned byte which represents only half of a unicode character. The remaining byte is held until the next decoding call, and the byte is then inserted at the beginning of the next set of bytes to be decoded, picking up byte decoding where the orphaned byte left off.