module training - remove BOM and convert to ISO-8859-1 in CSV writing
This commit is contained in:
parent
613ba6398c
commit
a94bf13b89
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user