summaryrefslogtreecommitdiff
path: root/includes/unicode.inc
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-07-27 01:58:43 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-07-27 01:58:43 +0000
commitd9d4b9bdab8ac4b6e5c01926da9d5a084707be94 (patch)
tree26d7809ceada308162d639ebf78c498d1e3955aa /includes/unicode.inc
parent88ccaf02c404878c21288f9d00f594b62962b610 (diff)
downloadbrdo-d9d4b9bdab8ac4b6e5c01926da9d5a084707be94.tar.gz
brdo-d9d4b9bdab8ac4b6e5c01926da9d5a084707be94.tar.bz2
- #27231: Friendly DB error screens.
Diffstat (limited to 'includes/unicode.inc')
-rw-r--r--includes/unicode.inc11
1 files changed, 9 insertions, 2 deletions
diff --git a/includes/unicode.inc b/includes/unicode.inc
index 368bc8596..6acc41411 100644
--- a/includes/unicode.inc
+++ b/includes/unicode.inc
@@ -6,6 +6,13 @@ define('UNICODE_SINGLEBYTE', 0);
define('UNICODE_MULTIBYTE', 1);
/**
+ * Wrapper around _unicode_check().
+ */
+function unicode_check() {
+ $GLOBALS['multibyte'] = _unicode_check();
+}
+
+/**
* Perform checks about Unicode support in PHP, and set the right settings if
* needed.
*
@@ -16,7 +23,7 @@ define('UNICODE_MULTIBYTE', 1);
* @param $errors
* Whether to report any fatal errors with form_set_error().
*/
-function unicode_check($errors = false) {
+function _unicode_check($errors = false) {
// Set the standard C locale to ensure consistent, ASCII-only string handling.
setlocale(LC_CTYPE, 'C');
@@ -70,7 +77,7 @@ function unicode_check($errors = false) {
* Return the required Unicode status and errors for admin/settings.
*/
function unicode_settings() {
- $status = unicode_check(true);
+ $status = _unicode_check(true);
$options = array(UNICODE_SINGLEBYTE => t('Standard PHP: operations on Unicode strings are emulated on a best-effort basis. Install the <a href="%url">PHP mbstring extension</a> for improved Unicode support.', array('%url' => 'http://www.php.net/manual/nl/ref.mbstring.php')),
UNICODE_MULTIBYTE => t('Multi-byte: operations on Unicode strings are supported through the <a href="%url">PHP mbstring extension</a>.', array('%url' => 'http://www.php.net/manual/nl/ref.mbstring.php')),
UNICODE_ERROR => t('Invalid: the current configuration is incompatible with Drupal.'));