[Mono-bugs] [Bug 627139] New: System.Xml.XmlDocument.Load behaves different from .net implementation when encountering encoding="UTF8"

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jul 30 14:31:58 EDT 2010


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

http://bugzilla.novell.com/show_bug.cgi?id=627139#c0


           Summary: System.Xml.XmlDocument.Load behaves different from
                    .net implementation when encountering encoding="UTF8"
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: fbergman at u.washington.edu
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:

when trying to edit an XML file with encoding "UTF8" i.e header: 

< ? xml version="1.0" encoding = " UTF8 " ? >


mono throws the exception: 

System.ArgumentException: Encoding name 'UTF8' not supported
Parameter name: name
  at System.Text.Encoding.GetEncoding (System.String name) [0x00000] in
<filename unknown>:0 
  at System.Xml.XmlInputStream.Initialize (System.IO.Stream stream) [0x00000]
in <filename unknown>:0 
  at System.Xml.XmlInputStream..ctor (System.IO.Stream stream) [0x00000] in
<filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Xml.XmlInputStream:.ctor
(System.IO.Stream)
  at System.Xml.XmlStreamReader..ctor (System.IO.Stream input) [0x00000] in
<filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Xml.XmlStreamReader:.ctor
(System.IO.Stream)
  at Mono.Xml2.XmlTextReader..ctor (System.String url, System.Xml.XmlNameTable
nt) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader..ctor (System.String url, System.Xml.XmlNameTable
nt) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.String filename) [0x00000] in
<filename unknown>:0 


whereas the .net implementation has no issues loading the file

Steps to reproduce the problem:
1. generate a XML file with header < ? xml version="1.0" encoding = " UTF8 " ?
>
2. try to load with XmlDocument.Load()


Actual Results:

the stacktrace above

Expected Results:

the xml document should have loaded normally

How often does this happen? 
always

Additional Information:

-- 
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