Skip to content

Add a way to write the BOM that Excel likes to read the csv properly #112

@GregOriol

Description

@GregOriol

It's maybe not the best of the best in the CSV world, but Excel likes to have a BOM at the beginning of the file to read it properly. It could be a good idea to add an option to write it, since there is already an implementation to read it.

For now, I'm using as a quick "hack" to make the CSV look good in Excel:

let csv = try CSVWriter(...codecType: UTF8.self,...)
csv.stream.write([0xef, 0xbb, 0xbf], maxLength: 3) // UnicodeBOM.utf8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions