Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/DataFrame/IO/CSV.hs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ ghci> D.readSeparated (D.defaultReadOptions { columnSeparator = ';' }) ".\/data\
readSeparated :: ReadOptions -> FilePath -> IO DataFrame
readSeparated !opts !path = do
let sep = columnSeparator opts
csvData <- BL.readFile path
let stripUtf8Bom bs = fromMaybe bs (BL.stripPrefix "\xEF\xBB\xBF" bs)
csvData <- stripUtf8Bom <$> BL.readFile path
let decodeOpts = Csv.defaultDecodeOptions{Csv.decDelimiter = fromIntegral (ord sep)}
let stream = CsvStream.decodeWith decodeOpts Csv.NoHeader csvData

Expand Down