From b7851e94c3f1683b63ec7250a12bcde3b7bed691 Mon Sep 17 00:00:00 2001 From: Luca Molteni Date: Sun, 10 Jun 2018 16:59:39 +0200 Subject: [PATCH] Use decode from Text --- hledger-lib/Hledger/Read/CsvReader.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Read/CsvReader.hs b/hledger-lib/Hledger/Read/CsvReader.hs index 7e824b384..3feaba935 100644 --- a/hledger-lib/Hledger/Read/CsvReader.hs +++ b/hledger-lib/Hledger/Read/CsvReader.hs @@ -63,7 +63,6 @@ import qualified Data.Csv as Cassava import qualified Data.Csv.Parser.Megaparsec as CassavaMP import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL -import qualified Data.ByteString.Char8 as C import Data.Foldable import Data.Either import Text.Megaparsec hiding (parse) @@ -206,7 +205,7 @@ parseResultToCsv :: (Foldable t, Functor t) => t (t B.ByteString) -> CSV parseResultToCsv = toListList . unpackFields where toListList = toList . fmap toList - unpackFields = (fmap . fmap) C.unpack + unpackFields = (fmap . fmap) (T.unpack . T.decodeUtf8) printCSV :: CSV -> String printCSV records = unlines (printRecord `map` records)