From 897e0712e8b3a1ac6564a1b0be988e77e8d50be9 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Thu, 28 Sep 2006 00:13:07 +0000 Subject: [PATCH] Comments. --- lib/moodlelib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 218e6de3f8..7de98adeb3 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -5608,9 +5608,9 @@ function shorten_text($text, $ideal=30) { if ($char == '.' or $char == ' ') { $truncate = $i+1; break 2; - } else if (ord($char) >= 0xE0) { - $truncate = $i; - break 2; + } else if (ord($char) >= 0xE0) { // Chinese/Japanese/Korean text + $truncate = $i; // can be truncated at any UTF-8 + break 2; // character boundary. } } $count++; -- 2.39.5