require_once $vendorAutoLoad;
}
+ // initialize intl fallback is necessary
+ \Patchwork\Utf8\Bootup::initIntl();
+
if (!defined('PHPUNIT_RUN')) {
OC\Log\ErrorHandler::setLogger(OC_Log::$object);
if (defined('DEBUG') and DEBUG) {
* @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;
- }
+ $normalizedValue = normalizer_normalize($value);
+ if ($normalizedValue === null || $normalizedValue === false) {
+ \OC_Log::write('core', 'normalizing failed for "' . $value . '"', \OC_Log::WARN);
+ } else {
+ $value = $normalizedValue;
}
return $value;