Skip to content

Commit 8d26546

Browse files
elastic-jasperkobelb
authored andcommitted
Backport PR elastic#8662 (elastic#8872) - Specifying the utf-8 charset when exporting aggregate tables
--------- **Commit 1:** Specifying the utf-8 charset when exporting aggregate tables * Original sha: 729bb9a * Authored by = <brandon.kobel@elastic.co> on 2016-10-13T16:35:52Z **Commit 2:** Fixing test. Modified capitalization of utf8 after reading W3C spec * Original sha: ee22983 * Authored by = <brandon.kobel@elastic.co> on 2016-10-13T16:59:14Z
1 parent fa11c03 commit 8d26546

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/ui/public/agg_table/__tests__/_table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe('AggTable Directive', function () {
179179
'1,2,"""foobar"""' + '\r\n'
180180
]);
181181
expect(call.args[0].opts).to.eql({
182-
type: 'text/plain'
182+
type: 'text/plain;charset=utf-8'
183183
});
184184
expect(call.args[1]).to.be('somefilename.csv');
185185
});

src/ui/public/agg_table/agg_table.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ uiModules
3636
};
3737

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

0 commit comments

Comments
 (0)