Skip to content

Commit

Permalink
Replace patchwork/utf8 with symfony-polyfill-*
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Jan 7, 2021
1 parent 8294726 commit 54afdee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 130 files
3 changes: 1 addition & 2 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,7 @@ public static function init() {
self::handleAuthHeaders();
self::registerAutoloaderCache();

// initialize intl fallback is necessary
\Patchwork\Utf8\Bootup::initIntl();
// initialize intl fallback if necessary
OC_Util::isSetLocaleWorking();

if (!defined('PHPUNIT_RUN')) {
Expand Down
8 changes: 7 additions & 1 deletion lib/private/legacy/OC_Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,13 @@ public function isHtaccessWorking(\OCP\IConfig $config) {
* @return bool
*/
public static function isSetLocaleWorking() {
\Patchwork\Utf8\Bootup::initLocale();
if ('' === basename('§')) {
// 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 ('' === basename('§')) {
return false;
}
Expand Down

0 comments on commit 54afdee

Please sign in to comment.