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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user