|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77239 pathinfo strips umlauts only at the beginning
Submitted: 2018-12-04 19:32 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: stephan dot eicher at check24 dot de Assigned:
Status: Open Package: *Directory/Filesystem functions
PHP Version: 7.1.24 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
28 - 28 = ?
Subscribe to this entry?

 [2018-12-04 19:32 UTC] stephan dot eicher at check24 dot de
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:

setlocale(LC_ALL, 'C');

echo pathinfo('änderungs', PATHINFO_FILENAME) . PHP_EOL;

echo pathinfo('bestandübertragung', PATHINFO_FILENAME) . PHP_EOL;

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jan 17 04:01:24 2019 UTC