title: C# - Korean Encoding
body: <p>This might be different with other Korean encoding questions.</p>
  
  <p>There is this site I have to scrape and it's Korean.</p>
  
  <p>An example sentence in their site is this
  "개인정보보호를 위해 뒤로가기 버튼 대신 검색결과 화면 상단과 하단의 이전 버튼을 사용하시기 바랍니다."</p>
  
  <p>I am using HttpWebRequest and HttpWebResponse to scrape the site.</p>
  
  <p>this is how I retreive the html</p>
  
  <p>-- partial code --</p>
  
  <pre><code>using (Stream data = resp.GetResponseStream())
  {
      response.Append(new StreamReader(data, Encoding.GetEncoding(code), true).ReadToEnd());
  }
  </code></pre>
  
  <p>now my problem is, am not getting the correct Korean characters. In my "code" variable, I'm basing the code page here in MSDN <a href="http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.text.encoding.aspx</a> (let me narrow it down). </p>
  
  <p>here are the Korean code pages:
  51949, 50225, 20949, 20833, 10003, 949</p>
  
  <p>but am still not getting the correct Korean characters? What you think is the problem?</p>