ASP.Net ページで天気 API を使用しています。
クエリに言語 (hl) を追加すると、「指定されたエンコーディングでは無効な文字です。1 行目、位置 526」というエラーが表示されます。
言語の get パラメータがなくても機能しますが、出力をローカライズしたいと考えています。
2行目にエラーがある私のコードは次のとおりです。
XmlDocument doc = new XmlDocument();
doc.Load("http://www.google.com/ig/api?hl=de&weather=" + location );
これは機能します:
XmlDocument doc = new XmlDocument();
doc.Load("http://www.google.com/ig/api?weather=" + location );
何か案が?