зеркало из https://github.com/nextcloud/server.git
some systems use en_US.UTF8 instead of en_US.UTF-8
This commit is contained in:
Родитель
96042f1e5b
Коммит
232a98524c
|
@ -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') {
|
||||
|
|
11
lib/util.php
11
lib/util.php
|
@ -526,12 +526,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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,7 +42,7 @@ if (!$_['islocaleworking']) {
|
|||
<legend><strong><?php echo $l->t('Locale not working');?></strong></legend>
|
||||
|
||||
<span class="connectionwarning">
|
||||
<?php echo $l->t('This ownCloud server can\'t set system locale to "en_US.UTF-8". This means that there might be problems with certain characters in file names. We strongly suggest to install the required packages on your system to support en_US.UTF-8.'); ?>
|
||||
<?php echo $l->t('This ownCloud server can\'t set system locale to "en_US.UTF-8"/"en_US.UTF8". This means that there might be problems with certain characters in file names. We strongly suggest to install the required packages on your system to support en_US.UTF-8/en_US.UTF8.'); ?>
|
||||
</span>
|
||||
|
||||
</fieldset>
|
||||
|
|
Загрузка…
Ссылка в новой задаче