function normalizer_normalize($s, $form = s\Normalizer::NFC) { return s\Normalizer::normalize($s, $form); }
/** * Normalize a unicode string * @param string $value a not normalized string * @return bool|string */ public static function normalizeUnicode($value) { if (class_exists('Patchwork\\PHP\\Shim\\Normalizer')) { $normalizedValue = \Patchwork\PHP\Shim\Normalizer::normalize($value); if ($normalizedValue === false) { \OC_Log::write('core', 'normalizing failed for "' . $value . '"', \OC_Log::WARN); } else { $value = $normalizedValue; } } return $value; }