[Mono-bugs] [Bug 527421] XDocument.Save (string, SaveOptions) behaves incorrectly.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Aug 2 22:51:45 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=527421

User aenomoto at novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=527421#c2





--- Comment #2 from Atsushi Enomoto <aenomoto at novell.com>  2009-08-02 20:51:42 MDT ---
Here is an example I tried:

using System;
using System.IO;
using System.Xml;
using System.Xml.Linq;

public class Test
{
        public static void Main ()
        {
                string xml = @"<root>
  </root>";
                var doc = XDocument.Parse (xml,
LoadOptions.PreserveWhitespace);
                doc.Save (Console.Out, SaveOptions.None);
                doc.Save (Console.Out, SaveOptions.DisableFormatting);
        }
}

Both .NET and mono outputs below (where Encoding.Default is CP932):

<?xml version="1.0" encoding="shift_jis"?>
<root>
  </root><?xml version="1.0" encoding="shift_jis"?><root>
  </root>

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


More information about the mono-bugs mailing list