1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 15:01:33 +02:00

[feature/patchwork-utf8] Normalize with intl, use patchwork/utf8 as fallback

This commit is contained in:
Nicolas Grekas
2013-11-20 13:47:31 +01:00
parent 1601b61ef9
commit 5a7caf6508
20 changed files with 110 additions and 2883 deletions

View File

@@ -633,14 +633,8 @@ function utf8_new_case_fold_nfkc($text, $option = 'full')
// do the case fold
$text = utf8_new_case_fold($text, $option);
if (!class_exists('utf_normalizer'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx);
}
// convert to NFKC
utf_new_normalizer::nfkc($text);
$text = Normalizer::normalize($text, Normalizer::NFKC);
// FC_NFKC_Closure, http://www.unicode.org/Public/5.0.0/ucd/DerivedNormalizationProps.txt
$text = strtr($text, $fc_nfkc_closure);