ID:               40962
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lamsoft at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *Unicode Issues
 Operating System: WinXP SP2
 PHP Version:      5.2.1
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The file operations do not support unicode.


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

[2007-03-30 18:43:34] lamsoft at gmail dot com

Since the browser also cannot submit the special character, here is the
snapshot of the error message.

http://xs313.xs.to/xs313/07135/list.jpg

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

[2007-03-30 18:40:03] lamsoft at gmail dot com

Description:
------------
unlink, rename function cannot be executed if the filename is in
unicode character, but opendir, readdir work fine.

The following output is from the browser which the encoding is already
set to UTF-8, it still some of the character cannot be read.

The OS is English, but the regional settings has been set to Chinese
(Taiwan), so that the PHP can only read characters those are in English
Character or BIG5.

<b>Warning</b>:  unlink(h:\ndsrom\temp\unzipped/EZ [WWW.ABCDE.ORG] -
[?&#65533;&#65533;,&#65533;&#65533;?&#65533;&#65533;,ROM,??,&#65533;&#65533;?,?&#65533;bEZ].url.url)
[<a href='function.unlink'>function.unlink</a>]: Invalid argument in
<b>D:\HTTP\Sub\nds\cli\php\checkUpdate_3.php</b> on line <b>157</b><br
/>

<br />
<b>Warning</b>: 
unlink(h:\ndsrom\temp\unzipped/&#65533;&#997;&#65533;?&#65533;&#65533;.txt)
[<a href='function.unlink'>function.unlink</a>]: Invalid argument in
<b>D:\HTTP\Sub\nds\cli\php\checkUpdate_3.php</b> on line <b>157</b><br
/>
<br />
<b>Warning</b>: 
rename(h:\ndsrom\temp\unzipped/&#65533;&#65533;?&#65533;&#65533;&#65533;?DS
&#65533;&#65533;??&#65533;P&#65533;&#65533;b&#65533;P&#65533;&#65533;?&#65533;&#65533;.nds,h:\ndsrom\temp\unzipped/test.zip)
[<a href='function.rename'>function.rename</a>]: Invalid argument in
<b>D:\HTTP\Sub\nds\cli\php\checkUpdate_3.php</b> on line <b>161</b><br
/>

Directory listing works fine, but it can't show the character~~
Array
(
    [0] => h:\ndsrom\temp\unzipped/EZ [WWW.EMU-ZONE.ORG] -
[?&#65533;&#65533;,&#65533;&#65533;?&#65533;&#65533;,ROM,??,&#65533;&#65533;?,?&#65533;bEZ].url.url
    [1] =>
h:\ndsrom\temp\unzipped/&#65533;&#997;&#65533;?&#65533;&#65533;.txt
    [2] =>
h:\ndsrom\temp\unzipped/&#65533;&#65533;?&#65533;&#65533;&#65533;?DS
&#65533;&#65533;??&#65533;P&#65533;&#65533;b&#65533;P&#65533;&#65533;?&#65533;&#65533;.nds
)

The file contains in that folder which browsed by Explorer: (An image,
those filename are some Simplified Chinese name in UTF8 encoding)
http://xs313.xs.to/xs313/07135/34tsdg.jpg

Reproduce code:
---------------
it is included in the description.
In addition, the parameter in the rename and unlink is passed by the
function of "directoryToArray" which is copied from
"http://snippets.dzone.com/posts/show/155"; and use foreach to unlink or
rename the filename

Expected result:
----------------
The file can be renamed and unlink successfully without any warnings.


Actual result:
--------------
it is included in the description.


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


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

Reply via email to