Merge pull request #7 from box/document_utf8_use

Document the use of UTF-8 by default
This commit is contained in:
Adrien Loison 2015-03-26 15:36:17 -07:00
commit c24cdbb9be
2 changed files with 4 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class XLSX implements EscaperInterface
public function escape($string) public function escape($string)
{ {
$escapedString = $this->escapeControlCharacters($string); $escapedString = $this->escapeControlCharacters($string);
$escapedString = htmlspecialchars($escapedString, ENT_QUOTES, 'utf-8'); $escapedString = htmlspecialchars($escapedString, ENT_QUOTES);
return $escapedString; return $escapedString;
} }

View File

@ -39,6 +39,7 @@ abstract class AbstractWriter implements WriterInterface
/** /**
* Adds data to the currently openned writer. * Adds data to the currently openned writer.
* The data must be UTF-8 encoded.
* *
* @param array $dataRow Array containing data to be streamed. * @param array $dataRow Array containing data to be streamed.
* Example $dataRow = ['data1', 1234, null, '', 'data5']; * 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. * 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. * @param array $dataRow Array containing data to be streamed.
* Example $dataRow = ['data1', 1234, null, '', 'data5']; * 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. * 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. * @param array $dataRows Array of array containing data to be streamed.
* Example $dataRow = [ * Example $dataRow = [