title: C# replaces special characters with question marks
body: <p>i'm having a problem with encoding in c#</p>
  
  <p>i'm downloading an xml file encoded in windows-1250 and then, when saved to a file, special characters like Š and Đ are replaced with ? even tho the file is saved correctly using the windows-1250 encoding. </p>
  
  <p>this is an example of my code (simplified): </p>
  
  <pre><code>var res = Encoding.GetEncoding("Windows-1250").GetBytes(client.DownloadString("http://link/file.xml"));
  var result = Encoding.GetEncoding("Windows-1250").GetString(res);
  File.AppendAllText("file.xml", result);
  </code></pre>
  
  <p>the xml file is in fact encoded using windows-1250 and it reads just fine when i download it using the browser.</p>
  
  <p>anyone knows what's going on here?</p>