X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2FWorkbook.php;h=718bdb66343e1bec237c5d543d7ce6af309e799f;hb=33dfc21a26f08e9ac19048bbcf80cce2351a6cfe;hp=bfc0c8efd545b6ef4ba14f8859da209fe8e1b811;hpb=5b8f4c4b4aa8cf996bc071f116bfce1273200fa2;p=fa-stable.git diff --git a/reporting/includes/Workbook.php b/reporting/includes/Workbook.php index bfc0c8ef..718bdb66 100644 --- a/reporting/includes/Workbook.php +++ b/reporting/includes/Workbook.php @@ -102,7 +102,6 @@ define('SPREADSHEET_EXCEL_WRITER_EQ', "="); */ define('SPREADSHEET_EXCEL_WRITER_NE', "<>"); -$encoding_string=''; /** * Class for creating OLE streams for Excel Spreadsheets * @@ -4878,11 +4877,10 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr */ function setInputEncoding($encoding) { - global $encoding_string; if ($encoding != 'UTF-16LE' && !function_exists('iconv')) { die("Using an input encoding other than UTF-16LE requires PHP support for iconv"); } - $this->_input_encoding = $encoding_string = $encoding; + $this->_input_encoding = $encoding; } /** added 2009-03-05 by Joe Hunt, FA for arabic languages */ @@ -7744,7 +7742,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri /* if ($this->_BIFF_version == 0x0600) // Tried to fix the correct handling here, with the { // corrected specification from M$ - Joe Hunt 2009-03-08 - global $encoding_string; + $encoding_string = $this->_input_encoding; if ($encoding_string == 'UTF-16LE') { $strlen = function_exists('mb_strlen') ? mb_strlen($sheetname, 'UTF-16LE') : (strlen($sheetname) / 2);