-
-
Notifications
You must be signed in to change notification settings - Fork 48
Description
As reported by Rajesh on X, BOM might be a bit problematic. Please read more about BOM here.
BOM detection could happen here: https://github.com/flow-php/flow/blob/1.x/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVExtractor.php#L45-L54
Ideally the reader should check for BOM and when it's present just skip and while reading the content. (It's important to remember that we should not modify the file as it might be remote readonly file) and instead we need to start reading from a different byte offset.
As for the API I think this should be built in and automatically enabled, but there shuld be an option to disable BOM detecttion through:
CSVExtractor::withBOMDetection(bool $enabled = true)