Skip to content

Commit

Permalink
fix: Fix the issue of exporting CSV files causing character encoding …
Browse files Browse the repository at this point in the history
…problems
  • Loading branch information
0xbe37e committed Aug 9, 2024
1 parent 91cc2e3 commit 2a29d79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v5.2.2

-[fix] Fix the issue of exporting CSV files causing character encoding problems

### v5.2.1

- [fix] Fix the issue with Phalcon Explorer button on Solscan Transaction Details page
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metasuites",
"version": "5.2.1",
"version": "5.2.2",
"repository": {
"type": "git",
"url": "https://github.com/blocksecteam/metasuites.git"
Expand Down Expand Up @@ -41,7 +41,7 @@
"ethers": "^6.0.8",
"is-mobile": "^4.0.0",
"jquery": "^3.6.3",
"json-2-csv": "^4.0.0",
"json-2-csv": "^5.5.5",
"json-bigint": "^1.0.0",
"ky": "^0.33.3",
"lodash-es": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const downloadCsv = async (
const isTwoDimensionalArray = json.length > 0 && Array.isArray(json[0])
const jsonStr = isTwoDimensionalArray
? convertToCSV(json as string[][])
: await json2csv(json)
: json2csv(json, { excelBOM: true })
const url = window.URL || window.webkitURL || window
const blob = new Blob([jsonStr])
const saveLink = document.createElementNS(
Expand Down

0 comments on commit 2a29d79

Please sign in to comment.