/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/mbstring/tests/mb_detect_encoding_incomplete_sequence.phpt
15 строк
459 B
Nikita Popov
Flush filter during non-strict encoding detection
27 авг 2021, 15:48
27 авг 2021, 15:48
43cb254
Код
Авторство
О чём код?
--TEST-- mb_detect_encoding() with incomplete trailing sequence --EXTENSIONS-- mbstring --FILE-- <?php // Even in non-strict mode, this should detect as ISO-8859-1. When the end of the string is // reached neither have illegal characters and would be picked based on score. However, flushing // the string will disqualify UTF-8 due to illegal characters. var_dump(mb_detect_encoding("A\xC2", ["UTF-8", "ISO-8859-1"])); ?> --EXPECT-- string(10) "ISO-8859-1"