From 2c221e825323a30ad9a5a9abd3666033a81c3e36 Mon Sep 17 00:00:00 2001 From: Keith POON Date: Thu, 25 Jul 2019 00:42:28 +0800 Subject: [PATCH] fixed: exporting records that contain utf8 content As the UTF-8 byte-order mark is \xef\xbb\xbf we should add it to the document's header. https://stackoverflow.com/questions/6336586/fwrite-and-utf8 --- src/Dump_File/Plaintext.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Dump_File/Plaintext.php b/src/Dump_File/Plaintext.php index 58787a0..ee18200 100644 --- a/src/Dump_File/Plaintext.php +++ b/src/Dump_File/Plaintext.php @@ -9,6 +9,7 @@ function open() { return fopen($this->file_location, 'w'); } function write($string) { + $string="\xEF\xBB\xBF".$string; return fwrite($this->fh, $string); } function end() {