Open ShaunB-SQ opened 1 year ago
The only other thing I can think of, is there some way to intercept the file buffer/string and do a
return line
.replace(/^\uFEFF/gm, '') // remove BOM
.replace(/^\u00BB\u00BF/gm, '') // remove UTF-8 Byte Order Mark
on it to stirp those characters out before it downloads to the client?
Trying to understand this, as my other coworker implemented this component.
calling this
CSVDownload.tsx
component.However when I run the created file through a quick script to look at the buffer of the file being created.
the output is
this is causing us an issue identical to this stack exchange question/answer if we open the file up with notepad++ first and convert it to just utf-8 from utf-8-BOM as described in the answer excel behaves appropriately.
Looking at the file after conversion in Notepad++ from my script I see:
This is how I expect it to write the file with uFEFF={false}, am I doing something wrong?