PhpSpreadsheet/tests/PhpSpreadsheetTests/Reader/Csv
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
..
CsvCallbackTest.php CSV Reader Enhancements 2021-05-16 06:05:02 -07:00
CsvContiguousFilter.php Rename Two Test Files (#2459) 2021-12-25 09:05:54 -08:00
CsvContiguousTest.php Rename Two Test Files (#2459) 2021-12-25 09:05:54 -08:00
CsvEncodingTest.php Php/iconv Should Not Treat FFFE/FFFF as Valid (#2910) 2022-07-02 08:53:39 -07:00
CsvIssue2232Test.php Work on setting up locale-aware formatted number conversion for the Csv Reader 2022-03-02 08:53:29 +01:00
CsvIssue2840Test.php Allow Csv Reader to Store Null String in Spreadsheet (#2842) 2022-05-21 07:21:14 -07:00
CsvLineEndingTest.php Add Ability to Suppress Mac Line Ending Check for CSV Reader (#2623) 2022-03-01 02:01:37 -08:00
CsvLoadFromStringTest.php Allow Csv Reader to Treat String as Contents of File (#2792) 2022-05-07 08:24:53 -07:00
CsvNumberFormatLocaleTest.php Phpstan Differences from Php7 to Php8, Again (#2665) 2022-03-11 23:28:30 -08:00
CsvNumberFormatTest.php Work on setting up locale-aware formatted number conversion for the Csv Reader 2022-03-02 08:53:29 +01:00
CsvTest.php Permit CSV Delimiter to be Set to Null (#2288) 2021-09-15 12:40:03 -07:00