Merge branch 'module_training_encoding'

This commit is contained in:
Rodney Figaro 2017-04-12 17:22:27 +02:00
commit d1d07a4dec

View File

@ -56,9 +56,12 @@ class CSVWriter
$this->flush();
}
// convert to ISO-8859-1
$this->buffer = utf8_decode($this->buffer);
$f = fopen($this->file_path, 'w');
if ($f) {
fwrite($f, pack('CCC', 0xEF, 0xBB, 0xBF));
// fwrite($f, pack('CCC', 0xEF, 0xBB, 0xBF));
fwrite($f, $this->buffer);
fclose($f);
}