You are here

function search_files_convert_to_utf8 in Search Files 6.2

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

Get the host system's character encoding and convert text from it to UTF-8, Drupal's default HTTP and database character encoding.

3 calls to search_files_convert_to_utf8()
search_files_attachments_index_file in ./search_files_attachments.module
get files to index
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…
search_files_directories_update_index in ./search_files_directories.module
Implementation of hook_update_index().

File

./search_files.module, line 466
Used to index files in attachments and directories

Code

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