From 33c7e4daa0f09c0d5025d33b9241194d6f1c58a8 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 7 Mar 2010 06:38:55 +0000 Subject: #614124 by Damien Tournoud: Set locale settings during bootstrap. --- includes/bootstrap.inc | 4 ++++ includes/unicode.inc | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index c263fbe50..7fe10da96 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -523,6 +523,10 @@ function drupal_environment_initialize() { ini_set('session.cache_limiter', 'none'); // Use httponly session cookies. ini_set('session.cookie_httponly', '1'); + + // Set sane locale settings, to ensure consistent string, dates, times and + // numbers handling. + setlocale(LC_ALL, 'C'); } /** diff --git a/includes/unicode.inc b/includes/unicode.inc index 6f1b52a48..c3638c9a8 100644 --- a/includes/unicode.inc +++ b/includes/unicode.inc @@ -39,9 +39,6 @@ function _unicode_check() { // Ensure translations don't break at install time $t = get_t(); - // Set the standard C locale to ensure consistent, ASCII-only string handling. - setlocale(LC_CTYPE, 'C'); - // Check for mbstring extension if (!function_exists('mb_strlen')) { return array(UNICODE_SINGLEBYTE, $t('Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.', array('@url' => 'http://www.php.net/mbstring'))); -- cgit v1.2.3