https://bugzilla.novell.com/show_bug.cgi?id=484795
Summary: WebClient.UploadValues using UTF-8 encoding and "POST"
method do not upload accented characters properly
Classification: Mono
Product: Mono: Class Libraries
Version: 1.9
Platform: x86
OS/Version: Kubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.0.7)
Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)
When I want to user the method WebClient.UploadValues, with an UTF-8 encoding,
all accented characters become '?'. The web page uses UTF-8 and it works fine
with the .NET framework.
Reproducible: Always
Steps to Reproduce:
1.Create a new instance of WebClient
2.Set the encoding to UTF-8
3.Upload accented value using "POST" method to a web page.
Here is an exemple :
WebClient wc = new WebClient();
NameValueCollection nv = new NameValueCollection();
nv.Add("test", "plop éé");
wc.Encoding = System.Text.Encoding.UTF8;
byte[] result = wc.UploadValues("http://galaid.free.fr/testmono.php", "POST",
nv);
Console.WriteLine(System.Text.Encoding.UTF8.GetString(result));
Actual Results:
ééé
plop ??
Expected Results:
ééé
plop éé
Here is the php code of testmono.php :
print(utf8_encode("ééé"));
print("\n");
print($_POST["test"]);
--
Configure bugmail: https://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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs