Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382074 )
Change subject: Support uploads with UTF-8 names on Windows ...................................................................... Support uploads with UTF-8 names on Windows On PHP 7.1 and later, filesystem functions on Windows use the Unicode system functions, which makes our file handling work for non-ASCII file names. Previously this was blacklisted for Windows on all PHP versions. Versions before 7.1 will still reject Unicode filenames with non-ASCII chars. Bug: T3780 Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f --- M includes/libs/filebackend/FSFileBackend.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/382074/1 diff --git a/includes/libs/filebackend/FSFileBackend.php b/includes/libs/filebackend/FSFileBackend.php index 30548ef..3b373db 100644 --- a/includes/libs/filebackend/FSFileBackend.php +++ b/includes/libs/filebackend/FSFileBackend.php @@ -99,7 +99,12 @@ } public function getFeatures() { - return !$this->isWindows ? FileBackend::ATTR_UNICODE_PATHS : 0; + if ( $this->isWindows && version_compare( PHP_VERSION, '7.1', 'lt' ) ) { + // PHP before 7.1 used 8-bit code page for filesystem paths on Windows + return 0; + } else { + return FileBackend::ATTR_UNICODE_PATHS; + } } protected function resolveContainerPath( $container, $relStoragePath ) { -- To view, visit https://gerrit.wikimedia.org/r/382074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER <br...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits