[wp-trac] [WordPress Trac] #15955: move_uploaded_file mangles non-ascii characters on Windows platforms

WordPress Trac noreply at wordpress.org
Fri Jan 8 09:44:44 UTC 2016


#15955: move_uploaded_file mangles non-ascii characters on Windows platforms
--------------------------+------------------------------
 Reporter:  t31os_        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Upload        |     Version:  2.0
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by oekarlsson):

 I have tried this patch on IIS8.5, PHP 7.01 and a multisite WordPress
 installation. It doesn't work as expected. The sanitize_file_name function
 that receives the reencoded filename from this code returns an empty
 string. I can make it all work if I comment out this line from the
 sanitize_file_name function:

 $filename = preg_replace( "#\x{00a0}#siu", ' ', $filename );

 But that is not a practical solution...

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15955#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list