ID: 43148 User updated by: banu_daniel1 at yahoo dot com Reported By: banu_daniel1 at yahoo dot com Status: Open Bug Type: Filesystem function related Operating System: windows xp 32 bits PHP Version: 5.2.4 New Comment:
well, i copy/paste the name of the file and did this echo filesize("E:\Emilya·Chad.mpg"); and i have the same result and also this if (file_exists("E:\Emilya·Chad.mpg")) echo "ok" and is not working. this is the hex value 453A456D696C7961FA436861642E6D7067 Previous Comments: ------------------------------------------------------------------------ [2007-10-31 20:57:46] carsten_sttgt at gmx dot de Well, the "・" is a Katakana middle dot. You have not used this char in your sample? Because I have no problems to create and access files with this char in the filename with PHP. You have a better (complete) testscript to reproduce the problem? Or what's the value $eps["FNAME"][$f] in hex? Regards, Carsten ------------------------------------------------------------------------ [2007-10-31 18:37:11] banu_daniel1 at yahoo dot com it's not a HTML entity what i had wrote in this example. I don't know whitch one convert it in html entity. The problem is that i have unicode characters in filename and filesize and file_exists (i discover just now and maybe other fuctions for files/directories access) is not working ------------------------------------------------------------------------ [2007-10-30 21:32:38] carsten_sttgt at gmx dot de The filesystem functions have no problem with unicode (utf-8). But you must use a unicode char, and not a HTML entity which are represent a unicode char. | $size= sprintf("%u", | filesize(html_entity_decode($eps["FNAME"][$f], | ENT_COMPAT, 'UTF-8') | ) | ); Regards, Carsten ------------------------------------------------------------------------ [2007-10-30 18:25:36] banu_daniel1 at yahoo dot com Description: ------------ it seems that this bug was reported and it says there "Marking as closed... also please try a newer version. " but the problem is still there even on windows xp so this is the problem filesize function dose not work with filenames with unicode characters. on linux version i don't have this problem. Reproduce code: --------------- $size=sprintf("%u", filesize($eps["FNAME"][$f]) Actual result: -------------- Warning: filesize() [function.filesize]: stat failed for E:\Emilya・Chad.mpg in C:\WWW\files.php on line 45 Just an example. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43148&edit=1