Skip to content

Commit 287c26b

Browse files
ChristophWurstMorrisJobke
authored andcommitted
Replace patchwork/utf8 with symfony-polyfill-*
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent 8294726 commit 287c26b

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

3rdparty

Submodule 3rdparty updated 130 files

lib/base.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,7 @@ public static function init() {
629629
self::handleAuthHeaders();
630630
self::registerAutoloaderCache();
631631

632-
// initialize intl fallback is necessary
633-
\Patchwork\Utf8\Bootup::initIntl();
632+
// initialize intl fallback if necessary
634633
OC_Util::isSetLocaleWorking();
635634

636635
if (!defined('PHPUNIT_RUN')) {

lib/private/legacy/OC_Util.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,13 @@ public function isHtaccessWorking(\OCP\IConfig $config) {
12931293
* @return bool
12941294
*/
12951295
public static function isSetLocaleWorking() {
1296-
\Patchwork\Utf8\Bootup::initLocale();
1296+
if ('' === basename('§')) {
1297+
// Borrowed from \Patchwork\Utf8\Bootup::initLocale
1298+
setlocale(LC_ALL, 'C.UTF-8', 'C');
1299+
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');
1300+
}
1301+
1302+
// Check again
12971303
if ('' === basename('§')) {
12981304
return false;
12991305
}

0 commit comments

Comments
 (0)