[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


https://bugzilla.novell.com/show_bug.cgi?id=399959

User andyhume32 at yahoo.co.uk added comment
https://bugzilla.novell.com/show_bug.cgi?id=399959#c3


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
http://blogs.msdn.com/dougste/archive/2007/09/06/version-history-of-the-clr-2-0.aspx
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