Ask a Question related to PHP Development, Design and Development.
-
spud at nothingness dot org #1
#25004 [NEW]: Uploaded file name truncated if accent present
From: spud at nothingness dot org
Operating system: RedHat 7.2
PHP version: 4.3.2
PHP Bug Type: *Languages/Translation
Bug description: Uploaded file name truncated if accent present
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".
--
Edit bug report at [url]http://bugs.php.net/?id=25004&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25004&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25004&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25004&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25004&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25004&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25004&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25004&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25004&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25004&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25004&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25004&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25004&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25004&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25004&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25004&r=gnused[/url]
spud at nothingness dot org Guest
-
Linked file uploaded - link still points to local file
Hi, We are faced with a strange problem in one of your Contribute sites: 2 users reported problems when linking and uploading files: user... -
accessing a pdf file present on linux os on windows
i want to create some user who can login and access files and tutorials that i keep on my server(linux,samba).i want to have all the logging... -
#25004 [Opn->Bgs]: Uploaded file name truncated if accent present
ID: 25004 User updated by: spud at nothingness dot org Reported By: spud at nothingness dot org -Status: Open... -
#25004 [Bgs->Opn]: Uploaded file name truncated if accent present
ID: 25004 User updated by: spud at nothingness dot org Reported By: spud at nothingness dot org -Status: Bogus... -
Delayed mouse over when Flash file present
When I have a flash movie embedded on an HTML page my javascript mouse overs that are gif images cut in HTML are delayed. Very frustrating. Anybody...



Reply With Quote

