Index: src/wp-includes/formatting.php
===================================================================
--- src/wp-includes/formatting.php	(revision 26243)
+++ src/wp-includes/formatting.php	(working copy)
@@ -844,7 +844,7 @@
 	$special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0));
 	$special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw);
 	$filename = str_replace($special_chars, '', $filename);
-	$filename = preg_replace('/[\s-]+/', '-', $filename);
+	$filename = preg_replace('/[\p{Z}\s-]+/u', '-', $filename); // Match all UTF-8 whitespace
 	$filename = trim($filename, '.-_');
 
 	// Split the filename into a base and extension[s]
@@ -864,7 +864,7 @@
 	foreach ( (array) $parts as $part) {
 		$filename .= '.' . $part;
 
-		if ( preg_match("/^[a-zA-Z]{2,5}\d?$/", $part) ) {
+		if ( preg_match("/^[a-zA-Z]{2,5}\d?$/u", $part) ) {
 			$allowed = false;
 			foreach ( $mimes as $ext_preg => $mime_match ) {
 				$ext_preg = '!^(' . $ext_preg . ')$!i';
