Permalink
Browse files

Comments.

  • Loading branch information...
1 parent c0adb54 commit 897e0712e8b3a1ac6564a1b0be988e77e8d50be9 martinlanghoff committed Sep 28, 2006
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/moodlelib.php
View
@@ -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++;

0 comments on commit 897e071

Please sign in to comment.