From: omidmr at gmail dot com
Operating system: Windows XP
PHP version: 5.1.1
PHP Bug Type: *Directory/Filesystem functions
Bug description: uploaded unicode filenames converts to underscore
Description:
------------
When i upload a file with unicode filename (in my case, it is in Persian)
PHP convert each character to an underscore sign (_).
for example when i upload a file, named "عÙÛ.php", it will convert to
"___.php"
the written program works fine with PHP 5.0.5.
Regards,
omid
Reproduce code:
---------------
the very very simple code that i tested is:
<form action="" method="post" enctype="multipart/form-data">
<input type="file" name="file"><br>
<input type="submit" name="submit" value="submit">
</form>
<?php
echo '<pre>';
print_r($_FILES['file']);
echo '</pre>';
?>
Expected result:
----------------
Array
(
[name] => Ø³ÙØ§Ù
.php
[type] => application/octet-stream
[tmp_name] => D:\php\tmp\php4D.tmp
[error] => 0
[size] => 0
)
Actual result:
--------------
Array
(
[name] => ____.php
[type] => application/octet-stream
[tmp_name] => D:\php\tmp\php4D.tmp
[error] => 0
[size] => 0
)
--
Edit bug report at http://bugs.php.net/?id=35721&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=35721&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=35721&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=35721&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35721&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=35721&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35721&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35721&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35721&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35721&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35721&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35721&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35721&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35721&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35721&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35721&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35721&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35721&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35721&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35721&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35721&r=mysqlcfg