-
-
Save papamitra/8062724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Network.HTTP | |
import Data.ByteString.Lazy.Char8 as B | |
import Codec.Text.IConv | |
main :: IO() | |
main = do | |
htmlSrc <- openURL "http://flowermaster.web.fc2.com/lrnanido_sara.html" | |
let src = convert "CP932" "UTF-8" $ B.pack htmlSrc | |
B.putStrLn src | |
openURL :: String -> IO String | |
openURL x = getResponseBody =<< simpleHTTP (getRequest x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment