I'm using the csv module along with csv-parse, stream-transform and csv-stringify modules to read in an excel file and select the columns I need. The CSV file contains special characters in Portuguese that cannot be encoded properly because I ignore the BOM character so that I can get the correct column names. I wanted to know if there was a way to add the BOM character to the resulting file so that the file can be properly encoded? Here are the options I use for the parser:
parse({
columns:true,
delimeter: ',',
bom: true
})