Check whether setlocale works only after setlocale

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
This commit is contained in:
Naoto Kobayashi 2021-11-14 08:25:32 +09:00
parent 455bff5c17
commit d2eb5aaa6d

View file

@ -1249,12 +1249,13 @@ class OC_Util {
// Borrowed from \Patchwork\Utf8\Bootup::initLocale
setlocale(LC_ALL, 'C.UTF-8', 'C');
setlocale(LC_CTYPE, 'en_US.UTF-8', 'fr_FR.UTF-8', 'es_ES.UTF-8', 'de_DE.UTF-8', 'ru_RU.UTF-8', 'pt_BR.UTF-8', 'it_IT.UTF-8', 'ja_JP.UTF-8', 'zh_CN.UTF-8', '0');
// Check again
if ('' === escapeshellcmd('§')) {
return false;
}
}
// Check again
if ('' === escapeshellcmd('§')) {
return false;
}
return true;
}