Skip to content

Commit

Permalink
Remove bom from tsv utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
ddooley committed Feb 4, 2025
1 parent 4e13907 commit 705c84c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function exportWorkbook(workbook, baseName, ext) {
saveBlob(data, fileName, 'text/plain;charset=UTF-16LE');
break;
*/

case 'csv':
case 'csv (UTF-8, no BOM)':
data = XlsxUtils.sheet_to_csv(worksheet, {FS: ','});
Expand All @@ -228,7 +228,7 @@ export function exportWorkbook(workbook, baseName, ext) {
// include the UTF-8 byte order mark ("BOM").
//writeFile(workbook, fileName, {bookType: 'csv', FS: '\t'});
data = XlsxUtils.sheet_to_csv(worksheet, {FS: '\t'});
data = '\uFEFF' + data; //BOM
//data = '\uFEFF' + data; //BOM
saveBlob(data, fileName, 'text/plain;charset=UTF-8');
break;

Expand Down

0 comments on commit 705c84c

Please sign in to comment.