[Mono-bugs] [Bug 559575] New: System.Text.UF7Encoding throws on invalid UTF7, unlike .Net 2.0
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Dec 1 10:56:26 EST 2009
http://bugzilla.novell.com/show_bug.cgi?id=559575
http://bugzilla.novell.com/show_bug.cgi?id=559575#c0
Summary: System.Text.UF7Encoding throws on invalid UTF7, unlike
.Net 2.0
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: brett at fogcreek.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=330289)
--> (http://bugzilla.novell.com/attachment.cgi?id=330289)
A tiny test app that illustrates the crash
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5)
Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
This might be the intended behavior, but since we are using Mono 2.0 to run an
app originally targeted at .Net 2.0, we are seeing throws in some inconvenient
places where .Net just writes a '?'. So the right thing to do here depends on
what Mono wants to be.
Reproducible: Always
Steps to Reproduce:
Run the attached test app against Mono 2.4.2.3.
Expected:
?
(Same as .Net 2.0)
Observed:
Actual Results:
Unhandled Exception: System.ArgumentException: Arg_InvalidUTF7
Parameter name: chars
at System.Text.UTF7Encoding.InternalGetChars (System.Byte[] bytes, Int32
byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex, System.Int32&
leftOver) [0x00000]
at System.Text.UTF7Encoding+UTF7Decoder.GetChars (System.Byte[] bytes, Int32
byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex) [0x00000]
at System.IO.StreamReader.ReadBuffer () [0x00000]
at System.IO.StreamReader.ReadLine () [0x00000]
at StreamReaderTest.InvalidUTF7.Main (System.String[] args) [0x00000]
Expected Results:
?
(Same as .Net 2.0)
--
Configure bugmail: http://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