diff --git a/core/includes/unicode.inc b/core/includes/unicode.inc index a2ff76b..3af3183 100644 --- a/core/includes/unicode.inc +++ b/core/includes/unicode.inc @@ -331,12 +331,12 @@ function truncate_utf8($string, $max_length, $wordsafe = FALSE, $add_ellipsis = */ function mime_header_encode($string) { if (preg_match('/[^\x20-\x7E]/', $string)) { - $chunk_size = 47; // floor((75 - strlen("=?UTF-8?B??=")) * 0.75); + $chunk_size = 45; // floor((75 - strlen("=?UTF-8?B??=\r\n ")) * 0.75); $len = strlen($string); $output = ''; while ($len > 0) { $chunk = drupal_truncate_bytes($string, $chunk_size); - $output .= ' =?UTF-8?B?' . base64_encode($chunk) . "?=\n"; + $output .= ' =?UTF-8?B?' . base64_encode($chunk) . "?=\r\n "; $c = strlen($chunk); $string = substr($string, $c); $len -= $c;