Bug #77239 [NEW]: pathinfo strips umlauts only at the beginning
From: stephan dot eicher at check24 dot de
Operating system: Linux
PHP version: 7.1.24
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:pathinfo strips umlauts only at the beginning
Description:
------------
Pathinfo will strip umlauts from the filename beginning if locale is not
correct set.
The strange thing is that it will not strip other umlauts for example if
they are in the middle of the string.
I would expect that it strips all umlauts or none but not that it will
strip them from the beginning but not in the string.
Test script:
---------------
<?php
setlocale(LC_ALL, 'C');
echo pathinfo('änderungs', PATHINFO_FILENAME) . PHP_EOL;
echo pathinfo('bestandübertragung', PATHINFO_FILENAME) . PHP_EOL;
Expected result:
----------------
änderungs
bestandübertragung
Actual result:
--------------
nderungs
bestandübertragung
--
Edit bug report at https://bugs.php.net/bug.php?id=77239&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77239&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77239&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77239&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77239&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77239&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77239&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77239&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77239&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77239&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77239&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77239&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77239&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77239&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77239&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77239&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77239&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77239&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77239&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77239&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77239&r=mysqlcfg
Thread (2 messages)
- stephan dot eicher at check24 dot de