Bug->Doc #53262 [Opn]: basename() cannot handle argument with special characters like french "ééé"

From: Date: Tue, 16 Nov 2010 15:41:47 +0000
Subject: Bug->Doc #53262 [Opn]: basename() cannot handle argument with special characters like french "ééé"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5528@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53262&edit=1 ID: 53262 Updated by: cataphract@php.net Reported by: frogone at fr dot firm dot lv Summary: basename() cannot handle argument with special characters like french "ééé" Status: Open -Type: Bug +Type: Documentation Problem -Package: CGI related +Package: Documentation problem Operating System: debian PHP Version: 5.2.14 Block user comment: N Private report: N New Comment: basename() uses php_mblen(), whose result depends on the locale: Example (terminal using iso-8859-15): glopes@nebm:~/php/php-t/bin$ LANG=pt_PT.utf8 php -r 'echo basename("./parent/\xe9\xe9\xe9"), "\n";' parent glopes@nebm:~/php/php-t/bin$ LANG=pt_PT.iso885915@euro php -r 'echo basename("./parent/\xe9\xe9\xe9"), "\n";' ééé Previous Comments: ------------------------------------------------------------------------ [2010-11-08 09:57:50] frogone at fr dot firm dot lv Description: ------------ Like this report :http://bugs.php.net/bug.php?id=37945 but with php-cgi (and fcgid). <?php echo basename("./parent/ééé"); ?> result : parent ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53262&edit=1

« previous php.doc.bugs (#5528) next »