PhpSpreadsheet/tests/data/Reader
oleibman c3f53854b6
Php/iconv Should Not Treat FFFE/FFFF as Valid (#2910)
Fix #2897. We have been relying on iconv/mb_convert_encoding to detect invalid UTF-8, but all techniques designed to validate UTF-8 seem to accept FFFE and FFFF. This PR explicitly converts those characters to FFFD (Unicode substitution character) before validating the rest of the string. It also substitutes one or more FFFD when it detects invalid UTF-8 character sequences.

A comment in the code being change stated that it doesn't handle surrogates. It is right not to do so. The only case where we should see surrogates is reading UTF-16. Additional tests are added to an existing test reading a UTF-16 Csv to demonstrate that surrogates are handled correctly, and that FFFE/FFFF are handled reasonably.
2022-07-02 08:53:39 -07:00
..
CSV Php/iconv Should Not Treat FFFE/FFFF as Valid (#2910) 2022-07-02 08:53:39 -07:00
Gnumeric Add support for reading Worksheet Visibility for Gnumeric 2022-05-24 14:08:41 +02:00
HTML Improve Coverage for HTML Reader 2020-06-25 22:42:38 -07:00
Ods Add support for reading Worksheet Visibility for Ods 2022-05-23 15:30:45 +02:00
Slk Process Comments in Sylk File (#2277) 2021-08-26 11:56:13 -07:00
XLS Add Hidden Worksheet unit tests for other Readers 2022-05-24 14:40:45 +02:00
XLSX Ignore square-$-brackets prefix in format string (#2886) 2022-06-15 14:55:17 -07:00
Xml Extract Property and Style readers from the XML Reader into separate classes (#2009) 2021-04-20 15:27:44 +02:00