title: Convert Utf-8 String To Windows Cp-1258
body: <p>I want to convert a text file from <code>utf-8</code> to <code>windows cp-1258</code> by C# console, here is my code but it does not work, the output file content is not <code>cp-1258</code> </p>
  
  <pre><code>string path = @"E:\mp4\test\Cyborg.txt";
  string readText = File.ReadAllText(path);
  Encoding vnmese = Encoding.GetEncoding("windows-1258");
  Encoding utf8 = Encoding.UTF8;
  byte[] utfBytes = utf8.GetBytes(readText);
  byte[] vnBytes = Encoding.Convert(utf8, vnmese, utfBytes);
  string msg = vnmese.GetString(vnBytes);
  string path2 = @"E:\mp4\test\MyTest.txt";
  File.WriteAllText(path2, msg, vnmese);
  </code></pre>
  
  <p>Any help would be much appreciated</p>