Bug #81390 [NEW]: mb_detect_encoding() regression
From: alec at alec dot pl
Operating system:
PHP version: 8.1.0beta3
Package: mbstring related
Bug Type: Bug
Bug description:mb_detect_encoding() regression
Description:
------------
The same code returns "ISO-8859-1" on PHP8.0 and "UUENCODE" on
PHP8.1.0beta3.
Note: the text contains some ascii with two 0x0EB characters
Note: ISO-8859-1 is before UUENCODE in the mb_list_encodings() result.
Note: Even removing UUENCODE from the list does not make it to return
expected ISO-8859-1
Test script:
---------------
$test = base64_decode('Q0hBUlNFVD13aW5kb3dzLTEyNTI6RG/rO0pvaG4=');
echo mb_detect_encoding($test, mb_list_encodings());
Expected result:
----------------
ISO-8859-1
Actual result:
--------------
UUENCODE
--
Edit bug report at https://bugs.php.net/bug.php?id=81390&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81390&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81390&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81390&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81390&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81390&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81390&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81390&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81390&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81390&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81390&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81390&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81390&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81390&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81390&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81390&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81390&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81390&r=mysqlcfg
Thread (37 messages)
- alec at alec dot pl
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- cmb@php.netBug #81390 [Opn->Ver]: mb_detect_encoding() regression
- nikic@php.netBug #81390 [Ver]: mb_detect_encoding() regression
- nikic@php.netBug #81390 [Ver]: mb_detect_encoding() regression
- nikic@php.netBug #81390 [Ver]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Ver]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Ver]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Ver->Csd]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Csd->Asn]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Asn->Csd]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Csd]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Csd->Asn]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn->Csd]: mb_detect_encoding() regression
- patrickallaert@php.netBug #81390 [Com]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Csd->Asn]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Com]: mb_detect_encoding() regression
- alexdowad@php.netBug #81390 [Asn]: mb_detect_encoding() regression
- alec at alec dot plBug #81390 [Asn->Csd]: mb_detect_encoding() regression
- adrien dot foulon at tukan dot huBug #81390 [Com]: mb_detect_encoding() regression
- adrien dot foulon at tukan dot huBug #81390 [Com]: mb_detect_encoding() regression