We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 790fa81 commit cb7b6c9Copy full SHA for cb7b6c9
1 file changed
src/DataFrame/IO/CSV.hs
@@ -236,7 +236,8 @@ ghci> D.readSeparated (D.defaultReadOptions { columnSeparator = ';' }) ".\/data\
236
readSeparated :: ReadOptions -> FilePath -> IO DataFrame
237
readSeparated !opts !path = do
238
let sep = columnSeparator opts
239
- csvData <- BL.readFile path
+ let stripUtf8Bom bs = fromMaybe bs (BL.stripPrefix "\xEF\xBB\xBF" bs)
240
+ csvData <- stripUtf8Bom <$> BL.readFile path
241
let decodeOpts = Csv.defaultDecodeOptions{Csv.decDelimiter = fromIntegral (ord sep)}
242
let stream = CsvStream.decodeWith decodeOpts Csv.NoHeader csvData
243
0 commit comments