[Mono-bugs] [Bug 74872][Nor] Changed - System.Uri construction from pre-escaped strings inconsistent

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 1 12:55:36 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 dsd at gentoo.org.

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

--- shadow/74872	2005-05-19 21:43:05.000000000 -0400
+++ shadow/74872.tmp.19641	2005-07-01 12:55:36.000000000 -0400
@@ -56,6 +56,24 @@
 Created an attachment (id=15100)
 TestUri.cs
 
 
 ------- Additional Comments From bmaurer at users.sf.net  2005-05-19 21:43 -------
 MSFT has the behavior that the reporter wants here.
+
+------- Additional Comments From dsd at gentoo.org  2005-07-01 12:55 -------
+Ok, the problem is inside HexUnescape(). MS.NET HexUnescape() works
+byte-wise, i.e. always returns a single-byte character, rather than
+going any futher.
+
+However, MS.NET does properly construct Uri's from strings which have
+multi-byte escaped sequences.
+
+I'm attaching a Mono patch to fix it, which simplifies HexUnescape()
+to only deal with single-byte characters, and then introduces a more
+correct HexUnescapeMultiByte() method for use handling Uri's internally.
+
+I'm also attaching another test program, where the expected results
+given in comments in the source indicate the output which MS.NET gives
+(after giving consideration to backslash/forwardslash).
+After my mono patch, all the tests in this program give the expected
+results.


More information about the mono-bugs mailing list