diff --git a/lib/base.php b/lib/base.php index 730cee5231..95f6482e61 100644 --- a/lib/base.php +++ b/lib/base.php @@ -472,6 +472,9 @@ class OC { @ini_set('post_max_size', '10G'); @ini_set('file_uploads', '50'); + // setting charset to UTF8 + @ini_set('default_charset', 'UTF-8'); + self::handleAuthHeaders(); self::initPaths(); diff --git a/lib/private/util.php b/lib/private/util.php index eea194288f..ec5b2740ae 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -1447,4 +1447,11 @@ class OC_Util { return false; } } + + /** + * @return string + */ + public static function isPhpCharSetUtf8() { + return ini_get('default_charset') === 'UTF-8'; + } } diff --git a/settings/admin.php b/settings/admin.php index 704f4519ff..230c31f620 100755 --- a/settings/admin.php +++ b/settings/admin.php @@ -39,6 +39,7 @@ $tmpl->assign('entriesremain', $entriesremain); $tmpl->assign('htaccessworking', $htaccessworking); $tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled() ? OC_Util::isInternetConnectionWorking() : false); $tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking()); +$tmpl->assign('isPhpCharSetUtf8', OC_Util::isPhpCharSetUtf8()); $tmpl->assign('isAnnotationsWorking', OC_Util::isAnnotationsWorking()); $tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking()); $tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded()); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 03f3efd7aa..de46cec476 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -129,14 +129,28 @@ if (!$_['has_fileinfo']) { // is PHP at least at 5.3.8? if ($_['old_php']) { ?> -