Why is my GetNextChar() in my DecoderFallbackBuffer Specialization Repeatedly Getting Called?

Posted by Canoehead on Stack Overflow See other posts from Stack Overflow or by Canoehead
Published on 2010-04-26T15:59:01Z Indexed on 2010/04/26 16:03 UTC
Read the original article Hit count: 321

Filed under:
|

I need to produce my own DecoderFallback and DecoderFallbackBuffer classes to implement some custom stream decoding.

I have found that the stream reader making use of it is calling GetNextChar() repeatedly even when my specilizaed DecoderFallbackBuffer.Remaining property returns 0 to indicate that there no more characters to return.

The end result is that the stream reader gets into an infinite loop.

Why is this happening?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about character-encoding