Skip to content

Commit

Permalink
bugfix #7 - non-latin chars in filename
Browse files Browse the repository at this point in the history
  • Loading branch information
psolom committed Jun 20, 2016
1 parent 6b84989 commit 95d831f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion connectors/php/BaseFilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ abstract class BaseFilemanager

public function __construct($extraConfig)
{
// fix display non-latin chars correctly
// https://github.com/servocoder/RichFilemanager/issues/7
setlocale(LC_CTYPE, 'en_US.UTF-8');

$this->fm_path = isset($extraConfig['fmPath']) && !empty($extraConfig['fmPath'])
? $extraConfig['fmPath']
: dirname(dirname(dirname(__FILE__)));
Expand Down Expand Up @@ -78,7 +82,7 @@ public function __construct($extraConfig)
if(!$config) {
$this->error("Error parsing the settings file! Please check your JSON syntax.");
}
$this->config = array_replace_recursive ($config_default, $config);
$this->config = array_replace_recursive($config_default, $config);

// override config options if needed
if(!empty($extraConfig)) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/filemanager.config.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"fileSorting": "NAME_ASC",
"folderPosition": "bottom",
"quickSelect": false,
"charsLatinOnly": true,
"charsLatinOnly": false,
"splitterWidth": 200,
"splitterMinWidth": 200,
"dateFormat": "d M Y H:i",
Expand Down

0 comments on commit 95d831f

Please sign in to comment.