Permalink
Browse files

Attempt to fix binary issue

  • Loading branch information...
1 parent 9bda7c5 commit bd08d07cc29893177efe8ef0e8be368657d56bbf @jgoerzen committed Feb 16, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 FeedParser.hs
View
@@ -39,6 +39,7 @@ import Data.Maybe.Utils
import Data.Char
import Data.Either.Utils
import Data.List
+import System.IO
data Item = Item {itemtitle :: String,
itemguid :: Maybe String,
@@ -68,7 +69,8 @@ item2ep pc item =
parse :: FilePath -> String -> IO (Either String Feed)
parse fp name =
- do c <- readFile fp
+ do h <- openBinaryFile fp ReadMode
+ c <- hGetContents h
case xmlParse' name (unifrob c) of
Left x -> return (Left x)
Right y ->

0 comments on commit bd08d07

Please sign in to comment.