
13 Jun
2010
13 Jun
'10
6 a.m.
HI all, I've managed to use the Curl bindings to pull down a web page, and I'm using TagSoup to parse it, but when I try to print the text in a TagText I get hPutChar: invalid argument (Invalid or incomplete multibyte or wide character) The code looks like: parsePage :: String -> IO () parsePage page = do let tags = map deTag $ filter isTagText $ parseTags page mapM_ putStrLn tags where deTag (TagText s) = s deTag x = error $ "Bad Tag '" ++ show x ++ "' in deTag." This is with ghc-6.12.1 on Debian Linux. Any clues appreciated. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/