[Mono-bugs] [Bug 75798][Cos] Changed - XmlSerializer prepends 3 garbage characters when serializing to stream

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 25 05:00:57 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.

http://bugzilla.ximian.com/show_bug.cgi?id=75798

--- shadow/75798	2005-08-12 17:10:57.000000000 -0400
+++ shadow/75798.tmp.30450	2005-08-25 05:00:57.000000000 -0400
@@ -1,15 +1,15 @@
 Bug#: 75798
 Product: Mono: Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: Fedora Core 4
 Status: NEW   
 Resolution: 
-Severity: 
-Priority: Major
+Severity: Unknown
+Priority: Cosmetic
 Component: Sys.XML
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: caetano at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
@@ -69,6 +69,19 @@
 
 
 Additional Information:
 
 It happens on linux but I'm unable to reproduce the problem on Mono running
 under Windows.
+
+------- Additional Comments From atsushi at ximian.com  2005-08-25 05:00 -------
+First of all, those characters are UTF-8 byte order marks. It is
+mandatory for UTF-8 text stream to not be misinterpreted as other
+encodings.
+
+Under MS.NET 1.x, XmlSerializer serializes output with "Default"
+encoding when it is indicated to serialize objects into Stream.
+However, it is often problematic. Thus .NET 2.0 uses UTF8Encoding for
+Stream input.
+
+The code is apparently bad because it incorrectly guesses that output
+is ASCIIEncoding. It won't work on .NET 2.0.


More information about the mono-bugs mailing list