aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop/unicode_testing.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-11-11 13:07:54 +0100
committerTristan Darricau <github@nicofuma.fr>2014-11-11 13:07:54 +0100
commit16de388437126d2c71a4039f480ae88ff68d479b (patch)
tree85e307cc811f20fd6f15723e30b3c9ddc01c842a /phpBB/develop/unicode_testing.php
parent4535740aa26f0e45270ee5a7b496700daf50af58 (diff)
parentd1a879a56c71de0aa9c7bb7c102d36057c674aa1 (diff)
downloadforums-16de388437126d2c71a4039f480ae88ff68d479b.tar
forums-16de388437126d2c71a4039f480ae88ff68d479b.tar.gz
forums-16de388437126d2c71a4039f480ae88ff68d479b.tar.bz2
forums-16de388437126d2c71a4039f480ae88ff68d479b.tar.xz
forums-16de388437126d2c71a4039f480ae88ff68d479b.zip
Merge pull request #1880 from nicolas-grekas/develop
[3.2] Rely on Intl and mbstring, use patchwork/utf8 as fallback * nicolas-grekas/develop: [feature/patchwork-utf8] Rely on mbstring, use patchwork/utf8 as fallback [feature/patchwork-utf8] Remove utf8_str_replace [feature/patchwork-utf8] Normalize with intl, use patchwork/utf8 as fallback
Diffstat (limited to 'phpBB/develop/unicode_testing.php')
-rw-r--r--phpBB/develop/unicode_testing.php35
1 files changed, 0 insertions, 35 deletions
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;
-}