setting and checking default_charset in php.ini to be UTF-8
This commit is contained in:
parent
3f58d949e0
commit
07dc0b2fdf
|
@ -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();
|
||||
|
|
|
@ -1447,4 +1447,11 @@ class OC_Util {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function isPhpCharSetUtf8() {
|
||||
return ini_get('default_charset') === 'UTF-8';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -140,6 +140,20 @@ if ($_['old_php']) {
|
|||
<?php
|
||||
}
|
||||
|
||||
// is PHP charset set to UTF8?
|
||||
if (!$_['isPhpCharSetUtf8']) {
|
||||
?>
|
||||
<div class="section">
|
||||
<h2><?php p($l->t('PHP charset is not set to UTF-8'));?></h2>
|
||||
|
||||
<span class="connectionwarning">
|
||||
<?php p($l->t("PHP charset is not set to UTF-8. This can cause major issues with non-acsii characters in file names. We highly recommend to change the value of 'default_charset' php.ini to 'UTF-8'.")); ?>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
// is locale working ?
|
||||
if (!$_['isLocaleWorking']) {
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue