Skip to content
Snippets Groups Projects
Commit 661b5501 authored by Florin Peter's avatar Florin Peter
Browse files

added normalizeUnicode() method to OC_Util

parent d4b700ef
No related branches found
No related tags found
No related merge requests found
<?php
require_once 'Patchwork/PHP/Shim/Normalizer.php';
/**
* Class for utility functions
*
......@@ -823,5 +826,16 @@ class OC_Util {
return $theme;
}
/**
* 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')) {
$value = \Patchwork\PHP\Shim\Normalizer::normalize($value);
}
return $value;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment