You are here

function _filebrowser_encoding_to_fs in Filebrowser 7.4

Same name and namespace in other branches
  1. 8 filebrowser.common.inc \_filebrowser_encoding_to_fs()
  2. 7.2 filebrowser.common.inc \_filebrowser_encoding_to_fs()
  3. 7.3 filebrowser.common.inc \_filebrowser_encoding_to_fs()

Convert a string from UTF-8 to FileSystem encoding.

Parameters

Object $node which provide FileSystem encoding information.:

string $source source string:

Return value

string re-encoded string

11 calls to _filebrowser_encoding_to_fs()
filebrowser_form_create_folder_submit in ./filebrowser.module
create folder submission. @inheritdoc
filebrowser_form_create_folder_validate in ./filebrowser.module
Implements hook_validate() for creating a folder @inheritdoc
filebrowser_form_delete_confirm in ./filebrowser.module
File delete confirmation form CHECK: $node is used but not defined in this function
filebrowser_form_plupload_upload_submit in ./filebrowser.module
uploads submission. @inheritdoc
filebrowser_form_rename in ./filebrowser.module
_state

... See full list

File

./filebrowser.common.inc, line 222
Misc filebrowser common functions.

Code

function _filebrowser_encoding_to_fs(&$node, $source) {

  // debug echo 'source : ' . $source . '<br>';
  return strcasecmp($node->folder_presentation->encoding, 'UTF-8') == 0 ? $source : mb_convert_encoding($source, $node->folder_presentation->encoding, "UTF-8");
}