[Mono-bugs] [Bug 399959] BinaryReader skips invalid characters by default, MSFT 2. 0 SP1 doesn't

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jun 15 08:28:34 EDT 2008


User andyhume32 at yahoo.co.uk added comment

Andy Hume <andyhume32 at yahoo.co.uk> changed:

           What    |Removed                                         |Added
            Summary|BinaryReader : ReadChars problem                |BinaryReader skips invalid characters by
                   |                                                |default, MSFT 2.0 SP1 doesn't

--- Comment #3 from Andy Hume <andyhume32 at yahoo.co.uk>  2008-06-15 06:28:33 MDT ---
Mono's FX2 BinaryReader defaults to a UTF8Encoding object which inserts nothing
when invalid data is read.  The MSFT current behaviour is obtained by passing a
standard UTF8 encoding into the two-parameter constructor:
    BinaryReader reader = new BinaryReader(memoryStream, Encoding.UTF8);

To be compatible with current MSFT 2.0 rather than original 2.0, the
single-parameter constructor should use a 'standard' UTF8Encoding.

The MSFT change was actually pre-SP1, actually in MS07-040.  See
and note that MS07-040=KB931212=>KB928365=2.0.50727.832

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list