Edit report at https://bugs.php.net/bug.php?id=47096&edit=1
ID: 47096
Comment by: xd-yang at qq dot com
Reported by: nuabaranda at web dot de
Summary: move_uploaded_file not OS encoding aware
Status: Open
Type: Bug
Package: Filesystem function related
Operating System: win32 only - Windows XP
PHP Version: 5.2.8
Block user comment: N
Private report: N
New Comment:
Since basename() is locale aware, why not move_uploaded_file()?
A common remedial measure is to use iconv() to explicitly convert the destination filename encoding
usually from utf-8 to ansi(like gb2312). But this becomes complicated and unreachable in a
multilingual CMS, like wordpress. Can this issue be solved in the future?
Previous Comments:
------------------------------------------------------------------------
[2009-02-26 09:46:51] mm107137 at spamcorptastic dot com
I have the same problem under debian host (ovh hoster).
Filename with french accents passed to move_upload_file are destroyed.
There's no problems if filename is not passed as utf8.
Very annoying
------------------------------------------------------------------------
[2009-02-06 20:21:49] mindfreakthemon at gmail dot com
And on Windows 7 and Vista under Apache 2.2 that bug exists too.
------------------------------------------------------------------------
[2009-01-14 09:26:41] nuabaranda at web dot de
Description:
------------
Files with filenames containing non-ascii characters like german umlauts get destroyed when saved
with move_uploaded_file(). The UTF-8 special characters get translated byte-wise into CP1251
characters when determining the Windows filenames thus destroying the original special characters.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=47096&edit=1