Bug #74414 [Opn->Fbk]: basename() random result with unicode filename
Edit report at https://bugs.php.net/bug.php?id=74414&edit=1
ID: 74414
Updated by: ab@php.net
Reported by: vasilii dot b dot shpilchin at gmail dot com
Summary: basename() random result with unicode filename
-Status: Open
+Status: Feedback
Type: Bug
Package: Unicode Engine related
Operating System: CentOS 7.2 x64
PHP Version: 7.1.3
Block user comment: N
Private report: N
New Comment:
Thanks for the report. There should be no difference in SAPI, the function is same everywhere.
Likely that the input encoding is different. If you use var_dump(), the length will likely reveal
whether a single byte encoding is used.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-04-11 12:40:57] vasilii dot b dot shpilchin at gmail dot com
Description:
------------
The function basename() are random split a filename by first ASCII char. I get unexcepted actual
result in 1/3 cases with same filename.
I get actual result with mod_php, and never in CLI.
Test script:
---------------
<?php
echo basename('/имÑ.doc');
Expected result:
----------------
имÑ.doc
Actual result:
--------------
.doc
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74414&edit=1
Thread (4 messages)