[Mono-bugs] [Bug 76218][Nor] Changed - Tokenizer/Seekable stream bugs.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 27 02:55:19 EDT 2005

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi at ximian.com.


--- shadow/76218	2005-09-27 02:32:49.000000000 -0400
+++ shadow/76218.tmp.4369	2005-09-27 02:55:19.000000000 -0400
@@ -74,6 +74,22 @@
 Hari, your input would be appreciated.
 ------- Additional Comments From martin at ximian.com  2005-09-27 02:32 -------
 I'm a bit confused here - you're saying this is a bug in
 SeekableStreamReader, but instead of fixing the SSR, your patch puts
 some ugly hacks in place which replace the SSR ?
+------- Additional Comments From atsushi at ximian.com  2005-09-27 02:55 -------
+Yes. Actually SeekableStreamReader won't fix *by design*.
+Encoding(Encoder) internally stores its state. There is a nice example
+encoding, iso-2022-jp; it stores "mode" which can be either ASCII or
+JISX0201. When we read stream and there is a "mode switch", then it
+shifts to JISX0201, and then goes back before that switch, then the
+Decoder will return unexpected results.
+UTF8Decoder holds "leftover" bits, so something similar to above will
+happen for UTF8.
+To remove SeekableStreamReader, we have to eliminate those part which
+depends on the stream rewind. It's not possible only at generic <>
+stuff for now.

More information about the mono-bugs mailing list