added normalizeUnicode() method to OC_Util

This commit is contained in:
Florin Peter 2013-05-24 20:35:01 +02:00
parent d4b700ef4e
commit 661b5501b0
1 changed files with 14 additions and 0 deletions

View File

@ -1,4 +1,7 @@
<?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;
}
}