Hi,
I were trying to get data from the url https://hanziyuan.net/#字 . This in percent encoding is
https://hanziyuan.net/#%E5%AD%97
.
No matter what I do, the data that loads is from the default page
https://hanziyuan.net/#%E8%BD%A6
https://hanziyuan.net/#车
The code I used is given below. It seems the encoded part is not getting passed on to the server
by the C# client.
// Online C# Editor for free
// Write, Edit and Run your C# code using C# Online Compiler
using System;
public class HelloWorld
{
public static void Main(string[] args)
{
System.Net.WebClient wc = new System.Net.WebClient();
byte[] raw = wc.DownloadData(new System.Uri("https://hanziyuan.net/#%E5%AD%97"));
string webData = System.Text.Encoding.UTF8.GetString(raw);
Console.WriteLine (webData);
}
}
The data that loads is from the default page: https://hanziyuan.net/#%E8%BD%A6
https://hanziyuan.net/#车
While **the expected data on that code **is from:
https://hanziyuan.net/#字
https://hanziyuan.net/#%E5%AD%97
I have tried with the string "https://hanziyuan.net/#字" as well. Nothing seems to work!
"