Bug #67756 [Opn->Dup]: basename() malfunctions with non-ASCII characters
| From: | cmb@php.net | Date: | Fri, 14 Oct 2016 16:31:01 +0000 |
| Subject: | Bug #67756 [Opn->Dup]: basename() malfunctions with non-ASCII characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204781@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67756&edit=1
ID: 67756
Updated by: cmb@php.net
Reported by: bugs dot php dot net at dw-perspective dot org dot
uk
Summary: basename() malfunctions with non-ASCII characters
-Status: Open
+Status: Duplicate
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Linux (Fedora)
PHP Version: 5.5.15
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Duplicate of bug #62119.
Previous Comments:
------------------------------------------------------------------------
[2014-08-04 10:29:30] bugs dot php dot net at dw-perspective dot org dot uk
Description:
------------
basename() returns a false result if the paramater begins with a non-ASCII character:
Confirmed on PHP 5.5.15 and 5.4.30.
The bug does not occur if the non-ASCII character is not first.
Reported previously on EOL-ed PHP version: https://bugs.php.net/bug.php?id=62119 - no
resolution yet exists.
Test script:
---------------
Shell script to demonstrate problem:
# echo -n "uploads/й.png" > filename.txt
# LANG=C php -r 'echo
basename(file_get_contents("filename.txt"))."\n";'
.png
# LANG=en_US.UTF-8 php -r 'echo
basename(file_get_contents("filename.txt"))."\n";'
й.png
Shell script to demonstrate non-existence of problem if the non-ASCII character is not first:
# echo -n "uploads/xй.png" > filename.txt
# LANG=C php -r 'echo
basename(file_get_contents("filename.txt"))."\n";'
xй.png
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67756&edit=1