Index: includes/unicode.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/unicode.inc,v retrieving revision 1.29 diff -u -p -r1.29 unicode.inc --- includes/unicode.inc 28 Dec 2007 12:02:50 -0000 1.29 +++ includes/unicode.inc 9 Oct 2008 23:33:27 -0000 @@ -510,10 +510,10 @@ function drupal_substr($text, $start, $l else if ($length > 0) { // Count all the continuation bytes from the starting index until we have // found $length + 1 characters. Then backtrack one byte. - $bytes = $istart; $chars = 0; + $bytes = $istart+1; $chars = 0; while ($bytes < $strlen && $chars < $length) { - $bytes++; $c = ord($text[$bytes]); + $bytes++; if ($c < 0x80 || $c >= 0xC0) { $chars++; }