Skip to content

Commit

Permalink
Merge pull request #139 from bcgov/scdicontact
Browse files Browse the repository at this point in the history
added fixes for special char csv extract
  • Loading branch information
suzalflueck authored Dec 13, 2023
2 parents 4aee412 + 9aac88f commit fc69cf1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/stores/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export const useAppStore = defineStore('app', {
},
exportCSV(csvData: any) {
// Create a blob with the CSV data
const blob = new Blob([csvData], { type: 'text/csv' });
const utf8EncodedData = new TextEncoder().encode('\uFEFF' +csvData);
const blob = new Blob([utf8EncodedData], { type: 'text/csv;charset=utf-8' });
// Create a temporary anchor element to trigger the file download
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
Expand Down

0 comments on commit fc69cf1

Please sign in to comment.