You are here

function _filebrowser_convert_from_fs_encoding in Filebrowser 6.2

Convert a string from FileSystem encoding to UTF-8.

Parameters

$node which provide FileSystem encoding information.:

$source source string:

Return value

re-encoded string

2 calls to _filebrowser_convert_from_fs_encoding()
filebrowser_page_download in includes/downloads.inc
Callback for filebrowser_download/%node menu.
_filebrowser_load_files in includes/filesystem.inc
Load data from current path.

File

includes/filesystem.inc, line 47

Code

function _filebrowser_convert_from_fs_encoding($node, $source) {
  if (!is_string($node->folder_presentation->encoding) || strcasecmp($node->folder_presentation->encoding, 'UTF-8')) {
    return $source;
  }
  else {
    return mb_convert_encoding($source, "UTF-8", $node->folder_presentation->encoding);
  }
}