Friday 15 May 2015

c# - download html using Curl Lib in korean language -


I am using curl LIB to download the html of a Korean website but the problem This is that I do not see the characters in the website. An example is given below:

Example I have to get the value:

  42,000  < / Pre> 

But when I get the HTML, I get it:

  42,000 ¿½ ½ ½ ½ ½ ½ ½ ½ ½ ½ ½ ¿½  

What is the same other Korean characters? What with Huh? I had something like this in the past, but it was in HTTPWEBREQUEST , but there is no indication of how to settle it now.

Any help is appreciated.

Update

This is a sample link and the function I use is below (curl lib):

  public string post (string url, string post, string reffer) {result = ""; Try {string UserAgent = "Mozilla / 5.0 (Windows NT 6.1; WOW64; rv: 21.0) Gecko / 20100101 Firefox / 21.0"; Curl.GlobalInit ((int) CURLinitFlag.CURL_GLOBAL_ALL); Easy Easy = New Easy (); Easy.WriteFunction wf = New Easy Lightlight (Autrodetta); Easy.SetOpt (Karloption.CURLOPT_URL, URL); Easy. Setup (Karloption. CURLOPT_REFERER, Riffare); Easy. Setup (Carlos CURLOPT_TIMEOUT, "6000000"); Easy.SetOpt (Karloption. CURLOPT_WRITEFUNCTION, WF); Easy. Setup (Karloption. CURLOPT_USERAGENT, Userager); Easy. Setup (Karloption. CURLOPT_COOKIEFILE, CookieFile); Easy.SetOpt (Karloption.CURLOPT_COOKIEJAR, CookieFile); Easy. Setup (cropes. CURLOPT_FOLLOWLOCATION, true); Easy.SetOpt (CURLoption.CURLOPT_ENCODING, Encoding.UTF8); // do not confirm this (post! = "") {Easy.SetOpt (CURLoption.CURLOPT_POST, true); Easy. Setup (Karolopection. CURLOPT_POSTFIELDS, POST); } If (URL canton ("https")) {easy.SetOpt (CURLoption.CURLOPT_SSL_VERIFYHOST, 1); Easy. Setup (Carlos CURLOPT_SSL_VERIFYPEER, 0); } easy. Form (); Easy.Cleanup (); } Hold (Exception Pre) {Console.WriteLine (East); } Return results; }   

What do I need to add the return HTML:

  .. meta name = "description" content = "ì ???? ?? ¬ ë | ¿?? ¼ ²² â ?? © "& gt; ..mata name = "keyword" content = "ì ???? â ?? ¬ ë? ¿?? ¼ë²¨" & gt; Instead of   

�

< P> Resolve this issue for me:
  results + = encoding GetEncoding (949). Gatestring (buff);    

No comments:

Post a Comment