Pick up some changes from text helper

refs 6ce4746474ddf050f7f4df61b7a22b7f5854d533
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index fc1bbe1..c39a26a 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1182,7 +1182,7 @@
 			}
 		}
 
-		// Use PHP's native public function to do the initial wordwrap.
+		// Use PHP's native function to do the initial wordwrap.
 		// We set the cut flag to FALSE so that any individual words that are
 		// too long get left alone. In the next step we'll deal with them.
 		$str = wordwrap($str, $charlim, "\n", FALSE);
@@ -1193,7 +1193,7 @@
 		{
 			// Is the line within the allowed character count?
 			// If so we'll join it to the output and continue
-			if (strlen($line) <= $charlim)
+			if (mb_strlen($line) <= $charlim)
 			{
 				$output .= $line.$this->newline;
 				continue;
@@ -1209,10 +1209,10 @@
 				}
 
 				// Trim the word down
-				$temp .= substr($line, 0, $charlim-1);
-				$line = substr($line, $charlim-1);
+				$temp .= mb_substr($line, 0, $charlim - 1);
+				$line = mb_substr($line, $charlim - 1);
 			}
-			while (strlen($line) > $charlim);
+			while (mb_strlen($line) > $charlim);
 
 			// If $temp contains data it means we had to split up an over-length
 			// word into smaller chunks so we'll add it back to our current line