Bug #74414 [Fbk->NoF]: basename() random result with unicode filename

From: Date: Sun, 23 Apr 2017 04:22:50 +0000
Subject: Bug #74414 [Fbk->NoF]: basename() random result with unicode filename
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208723@lists.php.net to get a copy of this message
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)

« previous php.bugs (#208723) next »