Skip to content

Commit

Permalink
core: add BOM mark to scoreboard csv export
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-moe committed Nov 18, 2024
1 parent b942ff5 commit d91634a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hydrooj/src/handler/contest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ export async function apply(ctx: Context) {
const [, rows] = await contest.getScoreboard.call(this, tdoc.domainId, tdoc._id, {
isExport: true, lockAt: this.tdoc.lockAt, showDisplayName: this.user.hasPerm(PERM.PERM_VIEW_DISPLAYNAME),
});
this.binary(toCSV(rows.map((r) => r.map((c) => c.value.toString()))), `${this.tdoc.title}.csv`);
this.binary(toCSV(rows.map((r) => r.map((c) => c.value.toString())), { bom: true }), `${this.tdoc.title}.csv`);
},
supportedRules: ['*'],
});
Expand Down

0 comments on commit d91634a

Please sign in to comment.