From 5a7caf65084369422fdbe4aaaae46e5de69cc594 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 20 Nov 2013 13:47:31 +0100 Subject: [feature/patchwork-utf8] Normalize with intl, use patchwork/utf8 as fallback --- phpBB/develop/unicode_testing.php | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'phpBB/develop/unicode_testing.php') diff --git a/phpBB/develop/unicode_testing.php b/phpBB/develop/unicode_testing.php index ec3c71d078..ca6d1b5f48 100644 --- a/phpBB/develop/unicode_testing.php +++ b/phpBB/develop/unicode_testing.php @@ -81,38 +81,3 @@ function utf8_to_unicode_callback($m) { return '\u' . str_pad(base_convert(utf8_ord($m[0]), 10, 16), 4, '0', STR_PAD_LEFT) . ''; } - -/** -* A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings -* to be in NFKC -* -* @param mixed $strings a string or an array of strings to normalize -* @return mixed the normalized content, preserving array keys if array given. -*/ -function utf8_normalize_nfkc($strings) -{ - if (empty($strings)) - { - return $strings; - } - - if (!class_exists('utf_normalizer')) - { - global $phpbb_root_path, $phpEx; - include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx); - } - - if (!is_array($strings)) - { - utf_normalizer::nfkc($strings); - } - else if (is_array($strings)) - { - foreach ($strings as $key => $string) - { - utf_normalizer::nfkc($strings[$key]); - } - } - - return $strings; -} -- cgit v1.2.1 From 73e6e5b77faadbb7676961bf38122d669de111db Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 3 Dec 2015 17:50:29 +0100 Subject: [ticket/13454] Remove unused variables This is the first part of the changes. More to come. PHPBB3-13454 --- phpBB/develop/unicode_testing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/develop/unicode_testing.php') diff --git a/phpBB/develop/unicode_testing.php b/phpBB/develop/unicode_testing.php index ca6d1b5f48..01586ca09b 100644 --- a/phpBB/develop/unicode_testing.php +++ b/phpBB/develop/unicode_testing.php @@ -19,7 +19,7 @@ if (!headers_sent()) function unicode_to_utf8($string) { $utf8 = ''; - $chars = array(); + for ($i = 0; $i < strlen($string); $i++) { if (isset($string[$i + 5]) && substr($string, $i, 2) == '\\u' && ctype_xdigit(substr($string, $i + 2, 4))) -- cgit v1.2.1