title: c# "\xC0\x80" sent as C0 3f ... Odd problem cant figure out the solution
body: <p>I have a very interesting problem. One to which i have yet to be able to find an answer.
  the code as follows</p>
  
  <pre><code>Console.WriteLine("\xc0\x80");
  Console.WriteLine(Encoding.GetEncoding(1252).GetString(new byte[] { 0xC0, 0x80 }));
  Console.WriteLine( Encoding.GetEncoding(1252).GetString(Encoding.GetEncoding(1252).GetBytes("\xc0\x80")));
  
  byte[] bt = new byte[2];
  bt[0] = (byte)'\xC0';
  bt[1] = (byte)'\x80';
  Console.WriteLine(Encoding.GetEncoding(1252).GetString(bt));
  </code></pre>
  
  <p>produces the following output:</p>
  
  <pre><code>À?
  À€
  À?
  À€
  </code></pre>
  
  <p>when encoded to bytes using codepage 1252 "\xc0\x80" produces C0 3f .. </p>
  
  <p>however, if i cast it straight to a byte array, the bytes are C0 80</p>
  
  <p>Suggestions?</p>
  
  <p>Also, the same code ran from vs in another machine, produces À€ on every line...
  The problem isent so much the code page, it's got to be a setting in vs or in windows
  causing the lookup from my default codepage to 1252.</p>