[wp-trac] [WordPress Trac] #21217: Encoding problems with uploading media files

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 11 15:00:30 UTC 2012


#21217: Encoding problems with uploading media files
--------------------------+------------------------------
 Reporter:  pavelevap     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.4.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => has-patch
 * component:  General => Media


Comment:

 Point 2 is specific to Windows builds of PHP (see
 [comment:ticket:15955:11], #18634, #19842).

 Point 1 is caused by `basename()` usage to get the file name in
 `get_media_item()`:
 http://core.trac.wordpress.org/browser/tags/3.4.1/wp-
 admin/includes/media.php#L1063

 From [http://php.net/manual/en/function.basename.php php.net]:
  basename() is locale aware, so for it to see the correct basename with
 multibyte character paths, the matching locale must be set using the
 setlocale() function.

 [attachment:21217.patch] fixes point 1 using one of the workarounds
 suggested there.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21217#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list