[Haskell-beginners] hPutChar: invalid argument (Invalid or
incomplete multibyte or wide character
Erik de Castro Lopo
mle+hs at mega-nerd.com
Sun Jun 13 02:00:15 EDT 2010
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/
More information about the Beginners
mailing list