Bug #74414 [Fbk->NoF]: basename() random result with unicode filename
Edit report at https://bugs.php.net/bug.php?id=74414&edit=1
ID: 74414
Updated by: php-bugs@lists.php.net
Reported by: vasilii dot b dot shpilchin at gmail dot com
Summary: basename() random result with unicode filename
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Unicode Engine related
Operating System: CentOS 7.2 x64
PHP Version: 7.1.3
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2017-04-14 16:28:15] ab@php.net
Seems a single byte encoding issue. UTF-8 is fine.
Thanks.
------------------------------------------------------------------------
[2017-04-14 16:20:59] ab@php.net
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.
------------------------------------------------------------------------
[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)