Bug #78817 [NEW]: pathinfo() on filenames starting with utf-8 character fails

From: Date: Fri, 15 Nov 2019 10:41:28 +0000
Subject: Bug #78817 [NEW]: pathinfo() on filenames starting with utf-8 character fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223724@lists.php.net to get a copy of this message
From: jasverix at gmail dot com Operating system: Debian Linux PHP version: 7.2.24 Package: Filesystem function related Bug Type: Bug Bug description:pathinfo() on filenames starting with utf-8 character fails Description: ------------ We have a filename starting with a non-ASCII filename character like "Æ", "Ø" or "Å". Then we try to get the filename without extension using PATHINFO_FILENAME. PHP will trim the first character from the resulting string. Test script: --------------- <?php $fileName = 'ÅfileÅnameÅ.docx'; // outputs "fileÅnameÅ" - missing starting character echo pathinfo($fileName, PATHINFO_FILENAME) . "\n"; Expected result: ---------------- ÅfileÅnameÅ Actual result: -------------- fileÅnameÅ -- Edit bug report at https://bugs.php.net/bug.php?id=78817&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78817&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78817&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78817&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78817&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78817&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78817&r=support Expected behavior: https://bugs.php.net/fix.php?id=78817&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78817&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78817&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78817&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78817&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78817&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78817&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78817&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78817&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78817&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78817&r=mysqlcfg

« previous php.bugs (#223724) next »