The following code:
var text = (new WebClient()).DownloadString("http://export.arxiv.org/api/query?search_query=au:Freidel_L*&start=0&max_results=20"));
results in a text variable that contains, among other things, a string
"$ ΓΒΊ $ - Minkowski space, scalar field and the Lorentz invariance problem"
However, when I visit this URL in Firefox, I get
$ ΞΊ $ -Mink space, scalar field, and the Lorentz invariance problem
which is actually correct. I also tried
var data = (new WebClient()).DownloadData("http://export.arxiv.org/api/query?search_query=au:Freidel_L*&start=0&max_results=20"); var text = System.Text.UTF8Encoding.Default.GetString(data);
but it gave the same problem.
I donβt know where to blame. Is the feed encoded in UTF8 and the browser is smart enough to understand this, but not WebClient ? Is UTF8 encoding correct, but does WebClient not work correctly? What can I do to reduce this?
Domenic Aug 21 '11 at 8:10 2011-08-21 08:10
source share