Index: wp-admin/admin-functions.php
===================================================================
--- wp-admin/admin-functions.php	(revision 3869)
+++ wp-admin/admin-functions.php	(working copy)
@@ -1882,7 +1882,8 @@
 			else
 				$filename = str_replace("$number$ext", ++$number . $ext, $filename);
 		}
-		$filename = preg_replace('#\.(?![^.]+$)#', '-', $filename);
+		$filename = str_replace($ext, '', $filename);
+		$filename = sanitize_title_with_dashes($filename) . $ext;
 	}
 
 	// Move the file to the uploads dir
