From 18f6e64910bb13c4d04ae72f4171e2f163c3e72a Mon Sep 17 00:00:00 2001 From: Adrien Loison Date: Thu, 26 Mar 2015 15:12:53 -0700 Subject: [PATCH] Document the use of UTF-8 by default --- src/Spout/Common/Escaper/XLSX.php | 2 +- src/Spout/Writer/AbstractWriter.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Spout/Common/Escaper/XLSX.php b/src/Spout/Common/Escaper/XLSX.php index fcb626a..7bdac43 100644 --- a/src/Spout/Common/Escaper/XLSX.php +++ b/src/Spout/Common/Escaper/XLSX.php @@ -27,7 +27,7 @@ class XLSX implements EscaperInterface public function escape($string) { $escapedString = $this->escapeControlCharacters($string); - $escapedString = htmlspecialchars($escapedString, ENT_QUOTES, 'utf-8'); + $escapedString = htmlspecialchars($escapedString, ENT_QUOTES); return $escapedString; } diff --git a/src/Spout/Writer/AbstractWriter.php b/src/Spout/Writer/AbstractWriter.php index 0e9e883..c78b211 100644 --- a/src/Spout/Writer/AbstractWriter.php +++ b/src/Spout/Writer/AbstractWriter.php @@ -39,6 +39,7 @@ abstract class AbstractWriter implements WriterInterface /** * Adds data to the currently openned writer. + * The data must be UTF-8 encoded. * * @param array $dataRow Array containing data to be streamed. * Example $dataRow = ['data1', 1234, null, '', 'data5']; @@ -135,6 +136,7 @@ abstract class AbstractWriter implements WriterInterface /** * Write given data to the output. New data will be appended to end of stream. + * The data must be UTF-8 encoded. * * @param array $dataRow Array containing data to be streamed. * Example $dataRow = ['data1', 1234, null, '', 'data5']; @@ -156,6 +158,7 @@ abstract class AbstractWriter implements WriterInterface /** * Write given data to the output. New data will be appended to end of stream. + * The data must be UTF-8 encoded. * * @param array $dataRows Array of array containing data to be streamed. * Example $dataRow = [