Skip to content

Commit

Permalink
Specifying the utf-8 charset when exporting aggregate tables (elastic…
Browse files Browse the repository at this point in the history
…#8662)

* Specifying the utf-8 charset when exporting aggregate tables
  • Loading branch information
kobelb authored and nreese committed Nov 10, 2016
1 parent 72e0b37 commit f2b6f16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ui/public/agg_table/__tests__/_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe('AggTable Directive', function () {
'1,2,"""foobar"""' + '\r\n'
]);
expect(call.args[0].opts).to.eql({
type: 'text/plain'
type: 'text/plain;charset=utf-8'
});
expect(call.args[1]).to.be('somefilename.csv');
});
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/agg_table/agg_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ uiModules
};

self.exportAsCsv = function (formatted) {
let csv = new Blob([self.toCsv(formatted)], { type: 'text/plain' });
let csv = new Blob([self.toCsv(formatted)], { type: 'text/plain;charset=utf-8' });
self._saveAs(csv, self.csv.filename);
};

Expand Down

0 comments on commit f2b6f16

Please sign in to comment.