From 422d7c63d9bdddf8f5e8550a528a8b7492eea5aa Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Sat, 28 Jan 2017 20:45:36 +0100 Subject: [PATCH] make UTF8 decoding lenient --- geval.cabal | 2 +- src/GEval/Core.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/geval.cabal b/geval.cabal index 677acce..0df7320 100644 --- a/geval.cabal +++ b/geval.cabal @@ -1,5 +1,5 @@ name: geval -version: 0.2.5.0 +version: 0.2.6.0 synopsis: Machine learning evaluation tools description: Please see README.md homepage: http://github.com/name/project diff --git a/src/GEval/Core.hs b/src/GEval/Core.hs index 9b357ee..dd5ca2b 100644 --- a/src/GEval/Core.hs +++ b/src/GEval/Core.hs @@ -250,7 +250,7 @@ averageC = getZipSink items :: MonadResource m => String -> (Text -> a) -> Source m (SourceItem a) items filePath parser = (CB.sourceFile filePath - $= (CT.decode CT.utf8 + $= (CT.decodeUtf8Lenient =$= CT.lines =$= CL.map ((\x -> Got x) . parser))) >> yield Done