[php-src] Issue #9858: json_decode Failed to ignore incorrect utf8
| From: | yinbug | Date: | Mon, 31 Oct 2022 08:29:24 +0000 |
| Subject: | [php-src] Issue #9858: json_decode Failed to ignore incorrect utf8 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242712@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9858
Author: yinbug
### Description
When the following mixed text is included, json_decode Failed to ignore incorrect utf8.
Even if ``
JSON_INVALID_UTF8_IGNORE``
```php
<?php
$contetns = '{"val":
"德妃 紫苏隔离 \uD83D\uDD17 \uD83D..."}';
$body = json_decode($contents, true, 512, JSON_INVALID_UTF8_IGNORE | JSON_THROW_ON_ERROR);
```
### PHP Version
8.1.4
### Operating System
_No response_