From 613ba6398cb7c891e8ce1c6f2edfb2cf2e31daa9 Mon Sep 17 00:00:00 2001 From: Rodney Figaro Date: Wed, 12 Apr 2017 15:45:21 +0200 Subject: [PATCH] add UTF-8 Byte order mark when writing CSV --- modules/training/models/CSVWriter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/training/models/CSVWriter.php b/modules/training/models/CSVWriter.php index 56c3422..99e511f 100644 --- a/modules/training/models/CSVWriter.php +++ b/modules/training/models/CSVWriter.php @@ -58,6 +58,7 @@ class CSVWriter $f = fopen($this->file_path, 'w'); if ($f) { + fwrite($f, pack('CCC', 0xEF, 0xBB, 0xBF)); fwrite($f, $this->buffer); fclose($f); }