[php-src] Issue #19344: mb_check_encoding returns true for € and ISO -8859-1 instead of false

From: Date: Fri, 01 Aug 2025 09:24:29 +0000
Subject: [php-src] Issue #19344: mb_check_encoding returns true for € and ISO -8859-1 instead of false
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250547@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19344 Author: jWeck-Software ### Description The following code: ```php <?php $str = '€'; var_dump(mb_check_encoding($str, 'ISO-8859-1')); ``` Resulted in this output: ``` true ``` But I expected this output instead: ``` false ``` https://en.wikipedia.org/wiki/ISO/IEC_8859-1#:~:text=by%20this%20standard.-,Euro%20sign,-%5Bedit%5D > The euro sign was first presented to the public on 12 December 1996.[13] Due to this character > set being introduced in 1987, it does not include the euro sign. Later character sets similar to > ISO/IEC 8859-1 include a euro sign, such as Windows-1252 and ISO/IEC 8859-15. ### PHP Version ```plain PHP 8.3.23 (cli|fpm) (built: Jul 3 2025 16:10:55) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.23, Copyright (c) Zend Technologies with Zend OPcache v8.3.23, Copyright (c), by Zend Technologies ``` ### Operating System Kubuntu 22.04, Ubuntu 24.04, Debian 12

« previous php.bugs (#250547) next »