summaryrefslogtreecommitdiff
path: root/includes/normal/UtfNormal.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-05-16 20:58:53 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-05-16 20:58:53 +0000
commitcecb985bee3bdd252e1b8dc0bd500b37cd52be01 (patch)
tree17266aa237742640aabee7856f0202317a45d540 /includes/normal/UtfNormal.php
parent0bac06c301f2a83edb0236e4c2434da16848d549 (diff)
Aktualisierung auf MediaWiki 1.10.0
Plugins angepasst und verbessert kleine Korrekturen am Design
Diffstat (limited to 'includes/normal/UtfNormal.php')
-rw-r--r--includes/normal/UtfNormal.php39
1 files changed, 19 insertions, 20 deletions
diff --git a/includes/normal/UtfNormal.php b/includes/normal/UtfNormal.php
index d8eac7b8..43bbafd8 100644
--- a/includes/normal/UtfNormal.php
+++ b/includes/normal/UtfNormal.php
@@ -17,21 +17,6 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# http://www.gnu.org/copyleft/gpl.html
-/**
- * Unicode normalization routines for working with UTF-8 strings.
- * Currently assumes that input strings are valid UTF-8!
- *
- * Not as fast as I'd like, but should be usable for most purposes.
- * UtfNormal::toNFC() will bail early if given ASCII text or text
- * it can quickly deterimine is already normalized.
- *
- * All functions can be called static.
- *
- * See description of forms at http://www.unicode.org/reports/tr15/
- *
- * @package UtfNormal
- */
-
/** */
require_once dirname(__FILE__).'/UtfNormalUtil.php';
@@ -111,8 +96,18 @@ define( 'UNORM_FCD', 6 );
define( 'NORMALIZE_ICU', function_exists( 'utf8_normalize' ) );
/**
+ * Unicode normalization routines for working with UTF-8 strings.
+ * Currently assumes that input strings are valid UTF-8!
*
- * @package MediaWiki
+ * Not as fast as I'd like, but should be usable for most purposes.
+ * UtfNormal::toNFC() will bail early if given ASCII text or text
+ * it can quickly deterimine is already normalized.
+ *
+ * All functions can be called static.
+ *
+ * See description of forms at http://www.unicode.org/reports/tr15/
+ *
+ * @addtogroup UtfNormal
*/
class UtfNormal {
/**
@@ -124,7 +119,7 @@ class UtfNormal {
*
* @param string $string a UTF-8 string
* @return string a clean, shiny, normalized UTF-8 string
- * @static
+ * @static
*/
static function cleanUp( $string ) {
if( NORMALIZE_ICU ) {
@@ -226,7 +221,7 @@ class UtfNormal {
static function loadData() {
global $utfCombiningClass;
if( !isset( $utfCombiningClass ) ) {
- require_once( 'UtfNormalData.inc' );
+ require_once( dirname(__FILE__) . '/UtfNormalData.inc' );
}
}
@@ -635,7 +630,11 @@ class UtfNormal {
}
if( isset( $utfCombiningClass[$c] ) ) {
$lastClass = $utfCombiningClass[$c];
- @$combiners[$lastClass] .= $c;
+ if( isset( $combiners[$lastClass] ) ) {
+ $combiners[$lastClass] .= $c;
+ } else {
+ $combiners[$lastClass] = $c;
+ }
continue;
}
}
@@ -805,4 +804,4 @@ class UtfNormal {
}
}
-?> \ No newline at end of file
+?>