|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-08-10 11:11 UTC] sniper@php.net
[2003-08-11 11:27 UTC] spud at nothingness dot org
[2003-08-11 11:34 UTC] spud at nothingness dot org
[2004-08-08 15:01 UTC] magnus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 22:00:01 2025 UTC |
Description: ------------ On a standard form upload, if the user uploads a file with a name like "?pice.jpg" (with an acute accent on the e), PHP reports the $_FILES[0]['name'] as "foo_e", dropping the accent and ALL following characters, including the suffix. I understand the perhaps the file upload can't handle the accented characters, but it seems incorrect to strip off the rest of the filename, including characters that are still legitimate. I don't know if this is a PHP bug or not, but it seems very limiting for non-English file uploads, where accented characters in a filename are common. Reproduce code: --------------- Example: with a page like <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> </head> <body> <form action="test.php" method="post" enctype="multipart/form-data"> <input type="file" name="upload"> <input type="submit" name="submit" value="submit"> </form> <? if (isset($_POST['submit'])) { print_r($_FILES); } ?> upload a file named "?pice.jpg", and PHP will report the filename as "e". Expected result: ---------------- I expect $_FILES[0]['name'] to be "?pice.jpg", or at least "epice.jpg". Actual result: -------------- Filename reported as "e".