title: encoding xml for deserialization in c#
body: <p>I have several xml files which I want do deserialize.</p>
  
  <pre><code>var serializer = new XmlSerializer(typeof(Document));
  var encoding = Encoding.GetEncoding("Windows-1252");
  var sr = new StreamReader(current_file, encoding, true);
  var reader = XmlReader.Create(sr);
  var i = (Document)serializer.Deserialize(reader);
  </code></pre>
  
  <p>The problem is that the files have got different encodings. "Windows-1252" and "iso-8859-1". How can I deal with both of them?</p>