summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php4
-rwxr-xr-xlib/util.php11
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/base.php b/lib/base.php
index 5bca1cde2d5..3de38258d03 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -346,7 +346,7 @@ class OC {
public static function init() {
// register autoloader
spl_autoload_register(array('OC', 'autoload'));
- setlocale(LC_ALL, 'en_US.UTF-8');
+ OC_Util::issetlocaleworking();
// set some stuff
//ob_start();
@@ -498,7 +498,7 @@ class OC {
// write error into log if locale can't be set
if (OC_Util::issetlocaleworking() == false) {
- OC_Log::write('core', 'setting locale to en_US.UTF-8 failed. Support is probably not installed on your system', OC_Log::ERROR);
+ OC_Log::write('core', 'setting locale to en_US.UTF-8/en_US.UTF8 failed. Support is probably not installed on your system', OC_Log::ERROR);
}
if (OC_Config::getValue('installed', false)) {
if (OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') {
diff --git a/lib/util.php b/lib/util.php
index 49d914e5fbd..a5fe4cb175a 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -560,12 +560,11 @@ class OC_Util {
return true;
}
- $result=setlocale(LC_ALL, 'en_US.UTF-8');
- if($result==false) {
- return(false);
- }else{
- return(true);
- }
+ $result = setlocale(LC_ALL, 'en_US.UTF-8', 'en_US.UTF8');
+ if($result == false) {
+ return false;
+ }
+ return true;
}
/**