You are here

function search_files_convert_to_utf8 in Search Files 5

Same name and namespace in other branches
  1. 6.2 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.

2 calls to search_files_convert_to_utf8()
search_files_list_directory in ./search_files.module
search_files_list_directory($directory, $id) 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 the search_files_files table
search_files_update_index in ./search_files.module
Implementation of hook_update_index()

File

./search_files.module, line 761
Used to index all files in directory(s) on the server

Code

function search_files_convert_to_utf8($text) {
  $encoding = iconv_get_encoding("output_encoding");
  $text = drupal_convert_to_utf8($text, $encoding);
  return $text;
}