|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: stephan dot eicher at check24 dot de
New email:
PHP Version: OS:


 [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: Tue Jan 22 17:01:25 2019 UTC