[Mono-dev] UrlEncode difference in dotnet and mono
Ben Maurer
bmaurer at ximian.com
Wed Dec 21 18:14:23 EST 2005
> Hi Gonzalo,
>
> I found that UrlEncode behaves differently in dotnet and Mono, namely
> Mono encodes the asterisk (*) symbol into %2a.
>
> The following code prints different values, for example:
>
> public static void Main ()
> {
> Console.Out.WriteLine
> (System.Web.HttpUtility.UrlEncode("aaa*bbb"));
> }
>
> A naive fix might be like this, but may be there are similar problems
> with other characters. What do you think?
This should really come with a unit test. In fact, what really should be
done is to generaate a table of UrlEncode (c) for c in [0...char.MaxValue]
on msft and check that we give the same results. This would make sure we
have no other issues.
-- Ben
More information about the Mono-devel-list
mailing list