| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2009-05-09 17:58 UTC] nilon at kartio dot org
  [2009-05-09 19:10 UTC] jani@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 05:00:01 2025 UTC | 
Description: ------------ mb_detect_encoding detects latin1 '?' as UTF-8 when it clearly isn't multibyte character. Reproduce code: --------------- <?php var_dump(mb_detect_encoding("\xe4", 'UTF-8, ISO-8859-1')); var_dump(mb_detect_encoding("\xe4", 'ISO-8859-1, UTF-8')); var_dump(mb_detect_encoding("\xe4", 'ISO-8859-1')); var_dump(mb_detect_encoding("\xe4", 'UTF-8')); ?> Expected result: ---------------- string(10) "ISO-8859-1" string(10) "ISO-8859-1" string(10) "ISO-8859-1" bool "false" Actual result: -------------- string(5) "UTF-8" string(10) "ISO-8859-1" string(10) "ISO-8859-1" string(5) "UTF-8"