C# - Switching System.Text.Decoder mid-stream - buffered data
<p>I have a Decoder instance, and am using its convert method in conjunction with a file reader to read in data with the appropriate encoding.</p>

<p>I'd like to switch the Decoder instance I'm using mid-way through my read, however I'm conscious that the original decoder may have some bytes buffered internally (incomplete chars) despite bytesUsed equalling byteCount, and this switch sounds as though it could then result in data loss.</p>

<p>Can I retrieve the internal byte buffer so I might pass it through? Additionally, this switch is only to occur when a fallback takes place - I have considered using the invalid bytes position made available by the fallback exception to 'split' the current read buffer (as presumably at this point any previous buffered bytes have been used), but perhaps there's a better way?</p>

<p>Thanks in advance,</p>

<p>James</p>
