Files uploaded using BinaryIO can start with a unicode BOM.
When dowloaded, these files must be decoded by detecting the BOM.
This does not apply to notebooks, because Databricks transforms the uploaded code before storage (pre-pending a header) and ignores the BOM if any (possibly a Databricks bug). As a result, it is not possible to store notebooks with a BOM.
Files uploaded using BinaryIO can start with a unicode BOM. When dowloaded, these files must be decoded by detecting the BOM. This does not apply to notebooks, because Databricks transforms the uploaded code before storage (pre-pending a header) and ignores the BOM if any (possibly a Databricks bug). As a result, it is not possible to store notebooks with a BOM.