summaryrefslogtreecommitdiff
path: root/inc/infoutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-07-28 09:24:07 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-07-28 09:24:07 +0200
commite5ab313f460502d6879db851a6a0201727bc6344 (patch)
tree1815473bb51e5aed27ffe42dc66463102dff0c69 /inc/infoutils.php
parent3008b6671845c9d4fabc53062b9140b5bf965b96 (diff)
downloadrpg-e5ab313f460502d6879db851a6a0201727bc6344.tar.gz
rpg-e5ab313f460502d6879db851a6a0201727bc6344.tar.bz2
check locale setting in do=check FS#2445
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r--inc/infoutils.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 2361b9081..d602fc7b7 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -176,6 +176,16 @@ function check(){
msg('mb_string extension not available - PHP only replacements will be used',0);
}
+ $loc = setlocale(LC_ALL, 0);
+ if(!$loc){
+ msg('No valid locale is set for your PHP setup. You should fix this',-1);
+ }elseif(stripos($loc,'utf') === false){
+ msg('Your locale <code>'.hsc($loc).'</code> seems not to be a UTF-8 locale, you should fix this if you encounter problems.',0);
+ }else{
+ msg('Valid locale '.hsc($loc).' found.', 1);
+ }
+
+
if($conf['allowdebug']){
msg('Debugging support is enabled. If you don\'t need it you should set $conf[\'allowdebug\'] = 0',-1);
}else{