From e5ab313f460502d6879db851a6a0201727bc6344 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 28 Jul 2012 09:24:07 +0200 Subject: check locale setting in do=check FS#2445 --- inc/infoutils.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'inc/infoutils.php') 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 '.hsc($loc).' 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{ -- cgit v1.2.3