Skip to content
Snippets Groups Projects
Commit c323eee1 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1869 from greezybacon/issue/1526


csv: Add UTF-8 BOM to export file

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 897a8b19 c0e3c98d
No related branches found
No related tags found
No related merge requests found
...@@ -276,6 +276,7 @@ class CsvResultsExporter extends ResultSetExporter { ...@@ -276,6 +276,7 @@ class CsvResultsExporter extends ResultSetExporter {
if (!$this->output) if (!$this->output)
$this->output = fopen('php://output', 'w'); $this->output = fopen('php://output', 'w');
fputs($this->output, chr(0xEF) . chr(0xBB) . chr(0xBF));
fputcsv($this->output, $this->getHeaders()); fputcsv($this->output, $this->getHeaders());
while ($row=$this->next()) while ($row=$this->next())
fputcsv($this->output, $row); fputcsv($this->output, $row);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment