Page MenuHomePhabricator

Can't upload non-ASCII filenames on Mac-hosted Latin-1 wiki
Closed, ResolvedPublic

Description

Noticed this while investigating bug 215. If a wiki hosted on Mac OS X is set for Latin-1 and a file with a
non-ASCII filenames is uploaded, the file can't be copied into place and the upload ultimately fails. An error
message like this is shown:

Warning: move_uploaded_file(/Users/brion/Sites/head/images/c/cc/Wiki_test_é.png): failed to open
stream: Invalid argument in /Users/brion/Sites/head/includes/SpecialUpload.php on line 217
Warning: move_uploaded_file(): Unable to move '/var/tmp/phpIVDrW5' to '/Users/brion/Sites/head/
images/c/cc/Wiki_test_é.png' in /Users/brion/Sites/head/includes/SpecialUpload.php on line 217

The problem is likely that the Mac's HFS+ filesystem, unlike traditional Unix filesystems, doesn't just use a
bag of bytes for filenames. BSD-level programs are expected to speak UTF-8, and the fs layer uses Unicode
internally. The literal latin-1 names are rejected as invalid and the file can't be written.

Note: check if Windows has similar problems.


Version: unspecified
Severity: minor
OS: Mac OS X 10.3
Platform: Macintosh

Details

Reference
bz362

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:53 PM
bzimport set Reference to bz362.
bzimport added a subscriber: Unknown Object (MLST).

Resolving as FIXED; since Latin-1 support is being dropped in 1.5 this will no longer be relevant.