ID:               30104
 User updated by:  lp at zy165 dot com
 Reported By:      lp at zy165 dot com
 Status:           Bogus
 Bug Type:         Directory function related
-Operating System: Linux 9
+Operating System: Linux RH 9
-PHP Version:      5.0.1
+PHP Version:      PHP-5.0.1
 New Comment:

My Expected result should exchange with Actual result.


Previous Comments:
------------------------------------------------------------------------

[2004-09-16 08:34:26] [EMAIL PROTECTED]

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of #30105

------------------------------------------------------------------------

[2004-09-16 07:43:49] lp at zy165 dot com

Description:
------------
I am Chinese. I love linux, php very much.
So I do many things using php.
But tody, i find an error of the function "basename()"
so that i can't continue writing code by php.
The error like this:
if the $path in function basename($path) contain the Chinese, then the
result will be error.
The error appears only in php-5.0.1, before the version it works
normally.
Please e-mail me after you see the letter, thank you very much.

Reproduce code:
---------------
<?php
$path="/home/httpd/ÎÒ/°®/Äã.php";
//Here the $path means "/home/httpd/I/Love/You.php",and "I love you" is
translated to Chinese.
$str1=basename ($path,".php");
$str2=basename ($path);
echo $path."<br>1:".$str1."<br>2:".$str2;

$path2="/home/httpd/ÎÒ/Love/Äã";
$str3=basename ($path2);
echo "<br><br>".$path2."<br>3:".$str3;

$path3="/home/httpd/I/Love/Äã";
$str4=basename ($path3);
echo "<br><br>".$path3."<br>4:".$str4;
?>

Expected result:
----------------
/home/httpd/ÎÒ/°®/Äã.php
1:.php
2:.php

/home/httpd/ÎÒ/Love/Äã
3:Love

/home/httpd/I/Love/Äã
4:Love

Actual result:
--------------
/home/httpd/ÎÒ/°®/Äã.php
1:Äã
2:Äã.php

/home/httpd/ÎÒ/Love/Äã
3:Äã

/home/httpd/I/Love/Äã
4:Äã


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30104&edit=1

Reply via email to