title: C#: Convert Japanese text encoding in shift-JIS and stored as ASCII into UTF-8
body: <p>I am trying to convert an old application that has some strings stored in the database as ASCII.</p>
  
  <p>For example, the string: ƒ`ƒƒƒlƒ‹ƒp[ƒgƒi[‚Ì‘I‘ð is stored in the database.</p>
  
  <p>Now, if I copy that string in a text editor and save it as ASCII and then open the file in a web browser and set it to automatically detect the Encoding, I get the correct string in japanese: チャネルパートナーの選択, and the page says that the detected encoding is Japanese (Shift_JIS).</p>
  
  <p>When I try to do the conversion in the C# code doing something like this:</p>
  
  <pre><code>var asciiBytes = Encoding.ASCII.GetBytes(text);
  var japaneseEncoding = Encoding.GetEncoding(932);
  var convertedBytes = Encoding.Convert(japaneseEncoding, Encoding.ASCII, asciiBytes);
  var japaneseString = japaneseEncoding.GetString(convertedBytes);
  </code></pre>
  
  <p>I get ?`???l???p?[?g?i?[???I?? as the japanese String and thus I cannot show it on the webpage.</p>
  
  <p>Any light would be appreciated.</p>
  
  <p>Thanks</p>