You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [x ] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)
What is the expected behavior?
error message :
htmlspecialchars(): charset `0' not supported, assuming utf-8
in file :
..../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php:90
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.
This is:
What is the expected behavior?
error message :
htmlspecialchars(): charset `0' not supported, assuming utf-8
in file :
..../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php:90
Trace :
#0 [internal function]: rbinit_exception_error_handler(2, 'htmlspecialchar...', '/usr/share/ranc...', 90, Array)
#1 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php(89): htmlspecialchars('2009-04-02T16:2...')
#2 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php(148): PhpOffice\PhpSpreadsheet\Shared\XMLWriter->writeRawData('2009-04-02T16:2...')
#3 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php(260): PhpOffice\PhpSpreadsheet\Writer\Xlsx\DocProps->writeDocPropsCore(Object(PhpOffice\PhpSpreadsheet\Spreadsheet))
Solution
Can you try to change the line
return $this->writeRaw(htmlspecialchars($text));
to
return $this->writeRaw(htmlspecialchars($text, ENT_QUOTES, 'UTF-8'));
on line 90 of file phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php
Thanks
What are the steps to reproduce?
Only with specials xlsx workbooks
Which versions of PhpSpreadsheet and PHP are affected?
All
The text was updated successfully, but these errors were encountered: