title: Why can Haskell not handle characters from a specific website?
body: <p>I was wondering if I can write a Haskell program to check updates of some novels on demand, and the website I am using as an example is <a href="http://www.piaotian.net/html/7/7430/" rel="nofollow noreferrer">this</a>. And I got a problem when displaying the contents of it (on a mac el capitan). The simple codes follow:</p>
  
  <pre><code>import Network.HTTP
  
  openURL :: String -&gt; IO String
  openURL = (&gt;&gt;= getResponseBody) . simpleHTTP . getRequest
  
  display :: String -&gt; IO ()
  display = (&gt;&gt;= putStrLn) . openURL
  </code></pre>
  
  <p>Then, when I run <code>display "http://www.piaotian.net/html/7/7430/"</code> on ghci, some strange characters appear; the first lines look like this:</p>
  
  <pre><code>&lt;title&gt;×ß½øÐÞÏÉ×îÐÂÕÂ½Ú,×ß½øÐÞÏÉÎÞµ¯´°È«ÎÄÔÄ¶Á_Æ®ÌìÎÄÑ§&lt;/title&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=gbk" /&gt;
  &lt;meta name="keywords" content="×ß½øÐÞÏÉ,×ß½øÐÞÏÉ×îÐÂÕÂ½Ú,×ß½øÐÞÏÉÎÞµ¯´° Æ®ÌìÎÄÑ§" /&gt;
  &lt;meta name="description" content="Æ®ÌìÎÄÑ§ÍøÌá¹©×ß½øÐÞÏÉ×îÐÂÕÂ½ÚÃâ·ÑÔÄ¶Á£¬Çë½«×ß½øÐÞÏÉÕÂ½ÚÄ¿Â¼¼ÓÈëÊÕ²Ø·½±ãÏÂ´ÎÔÄ¶Á,Æ®ÌìÎÄÑ§Ð¡ËµÔÄ¶ÁÍø¾¡Á¦ÔÚµÚÒ»Ê±¼ä¸üÐÂÐ¡Ëµ×ß½øÐÞÏÉ£¬Èç·¢ÏÖÎ´¼°Ê±¸üÐÂ£¬ÇëÁªÏµÎÒÃÇ¡£" /&gt;
  &lt;meta name="copyright" content="×ß½øÐÞÏÉ°æÈ¨ÊôÓÚ×÷ÕßÎáµÀ³¤²»¹Â" /&gt;
  &lt;meta name="author" content="ÎáµÀ³¤²»¹Â" /&gt;
  &lt;link rel="stylesheet" href="/scripts/read/list.css" type="text/css" media="all" /&gt;
  &lt;script type="text/javascript"&gt;
  </code></pre>
  
  <p>I also tried to download as a file as follows:</p>
  
  <pre><code>import Network.HTTP
  
  openURL :: String -&gt; IO String
  openURL = (&gt;&gt;= getResponseBody) . simpleHTTP . getRequest
  
  downloading :: String -&gt; IO ()
  downloading = (&gt;&gt;= writeFile fileName) . openURL
  </code></pre>
  
  <p>But after downloading the file, it is like in the photo:
  <a href="https://i.stack.imgur.com/bExTt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bExTt.png" alt="enter image description here"></a></p>
  
  <p>If I download the page by python (using urllib for example) the characters are displayed normally. Also, if I write a Chinese html and parse it, then there seems to be no problem. Thus it seems that the problem is on the website. However, I don't see any difference between the characters of the site and those I write.</p>
  
  <p>Any help on the reason behind this is well appreciated.</p>
  
  <p><strong>P.S.</strong><br>
  The python code is as follows:</p>
  
  <pre><code>import urllib
  
  urllib.urlretrieve('http://www.piaotian.net/html/7/7430/', theFic)
  
  theFic = file_path
  </code></pre>
  
  <p>And the file is all fine and good.</p>