You are here

function search_files_convert_to_utf8 in Search Files 7.2

Same name and namespace in other branches
  1. 5 search_files.module \search_files_convert_to_utf8()
  2. 6.2 search_files.module \search_files_convert_to_utf8()

Converts text to UTF8 using the system's character encoding.

2 calls to search_files_convert_to_utf8()
search_files_attachments_index_file in ./search_files_attachments.module
Indexing file contents.
search_files_directories_list_directory in ./search_files_directories.module
search_files_directories_list_directory($basedir, $subdir, $id, $helpers) will be called recursively to traverse the directory tree and list all the files in the given directory, it will take the files it find and put them into…

File

./search_files.module, line 506
Organizes and provides helper functions for extracting text from files.

Code

function search_files_convert_to_utf8($text) {
  $encoding = mb_detect_encoding($text);
  $text = drupal_convert_to_utf8($text, $encoding);
  return $text;
}