aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop/unicode_testing.php
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2013-11-20 13:47:31 +0100
committerNicolas Grekas <nicolas.grekas@gmail.com>2014-11-08 11:36:13 +0100
commit5a7caf65084369422fdbe4aaaae46e5de69cc594 (patch)
tree2845c69f21c9784457335ab8c43deaf74990a23a /phpBB/develop/unicode_testing.php
parent1601b61ef923496b8b9f0f13f35023397f2162f3 (diff)
downloadforums-5a7caf65084369422fdbe4aaaae46e5de69cc594.tar
forums-5a7caf65084369422fdbe4aaaae46e5de69cc594.tar.gz
forums-5a7caf65084369422fdbe4aaaae46e5de69cc594.tar.bz2
forums-5a7caf65084369422fdbe4aaaae46e5de69cc594.tar.xz
forums-5a7caf65084369422fdbe4aaaae46e5de69cc594.zip
[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;
-}