[Mono-bugs] [Bug 76095][Nor] New - XmlTextWriter produces bogus output for UTF-16 surrogate characters

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 13 18:26:51 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 brion at pobox.com.

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

--- shadow/76095	2005-09-13 18:26:51.000000000 -0400
+++ shadow/76095.tmp.17551	2005-09-13 18:26:51.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 76095
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Ubuntu Hoary/x86
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: brion at pobox.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlTextWriter produces bogus output for UTF-16 surrogate characters
+
+Description of Problem:
+When outputting text containing UTF-16 surrogate characters, XmlTextWriter
+produces numeric character references for the surrogate code points instead
+of the actual referenced (21-bit) character. This output is not well-formed
+XML and can't be read back in by any compliant XML parser.
+
+Steps to reproduce the problem:
+1. writer.WriteElementString("a", "\ud800\udf39");
+
+Actual Results:
+<a>&#xD800;&#xDF39;</a>
+
+Expected Results:
+<a>&#x10339;</a>
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+This breaks the ability to round-trip read and write an equivalent XML
+document when you may contain characters outside the basic multilingual plane.
+
+Tested with Mono SVN r49929 and 1.1.8 release.


More information about the mono-bugs mailing list