Permalink
Browse files

A fix to prevent breaking of lines in multibyte languages

  • Loading branch information...
1 parent 4f8442c commit ea944efe7f2777a06c2b270579ee14b70a65c72b moodler committed Jul 7, 2004
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/weblib.php
View
4 lib/weblib.php
@@ -197,6 +197,10 @@ function break_up_long_words($string, $maxsize=20, $cutchar=' ') {
/// Given some normal text, this function will break up any
/// long words to a given size, by inserting the given character
+ if (in_array(current_language(), array('ja', 'zh_cn', 'zh_tw', 'zh_tw_utf8'))) { // Multibyte languages
+ return $string;
+ }
+
$output = '';
$length = strlen($string);
$wordlength = 0;

0 comments on commit ea944ef

Please sign in to comment.