php.net |  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: -
Votes:1
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
Have you experienced this issue?
Rate the importance of this bug to you:

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Dec 10 03:01:25 2018 UTC