--- search_files.module	2010-06-18 17:48:25.000000000 +0200
+++ search_files_new.module	2010-12-03 11:48:17.000000000 +0100
@@ -465,7 +465,7 @@ function search_files_helper_db_add($nam
  * Drupal's default HTTP and database character encoding.
  */
 function search_files_convert_to_utf8($text) {
-  $encoding = iconv_get_encoding("output_encoding");
+  $encoding = mb_detect_encoding($text);
   $text = drupal_convert_to_utf8($text, $encoding);
   return $text;
 }
