Index: tests/phpunit/tests/formatting/RemoveAccents.php
===================================================================
--- tests/phpunit/tests/formatting/RemoveAccents.php	(revision 26348)
+++ tests/phpunit/tests/formatting/RemoveAccents.php	(working copy)
@@ -94,4 +94,42 @@
 
 		remove_filter( 'locale', array( $this, '_remove_accents_germanic_umlauts_cb' ) );
 	}
+
+	/**
+	 * @ticket 24661
+	 */
+	public function test_remove_accents_combining_marks() {
+		// Creates a string with all the combining marks.
+		$code_points = array_merge(
+			range( 0x0300, 0x036F ), // Combining Diacritical Marks
+			range( 0x1DC0, 0x1DFF ), // Combining Diacritical Marks Supplement
+			range( 0x20D0, 0x20FF ), // Combining Diacritical Marks for Symbols
+			range( 0xFE20, 0xFE2F )  // Combining Half Marks
+		);
+		$combining_marks = '';
+		foreach ( $code_points as $code_point )
+			if ( $code_point <= 0x07ff )
+				$combining_marks .= chr( 0xc0 | ( $code_point >> 6 ) ) . chr( 0x80 | ( $code_point & 0x003f ) );
+			else
+				$combining_marks .= chr( 0xe0 | ( $code_point >> 12 ) ) . chr( 0x80 | ( ( $code_point >> 6 ) & 0x003f ) ) . chr( 0x80 | ( $code_point & 0x003f ) );
+		// Performs the test: all the characters should be removed.
+		$this->assertEquals( '', remove_accents( $combining_marks ) );
+		
+		// test a collection of filenames that could have problems 
+		$test1 = remove_accents( 'Capture d’écran 2013-02-20 à 23.36.06.png' );
+		$test1_no_accents = 'Capture d’ecran 2013-02-20 a 23.36.06.png'; 
+		
+		$this->assertEquals( $test1, $test1_no_accents );
+		
+		$test2 = remove_accents( 'Buttermödeli.jpg' );
+		$test2_no_accents = 'Buttermodeli.jpg';
+		
+		$this->assertEquals( $test2, $test2_no_accents );
+		
+		$test3 = remove_accents( 'Münsterl.Mai13a.jpg' );
+		$test3_no_accents = 'Munsterl.Mai13a.jpg';
+		
+		$this->assertEquals( $test3, $test3_no_accents );
+	}
+
 }
