PHP Classes

Bug in _encode_header()

Recommend this page to a friend!

      HTML Mime Mail  >  All threads  >  Bug in _encode_header()  >  (Un) Subscribe thread alerts  
Subject:Bug in _encode_header()
Summary:wanted whitespace is removed if subject contains ÄÖÜß
Messages:1
Author:ksjdasd
Date:2009-08-18 12:29:02
 

  1. Bug in _encode_header()   Reply   Report abuse  
Picture of ksjdasd ksjdasd - 2009-08-18 12:29:02
The _encode_header() function needs to be as follows:

*/
function _encodeHeader($input, $charset = 'ISO-8859-15')
{
$m = preg_match_all('/(\w*[\x80-\xFF]+\w*)/', $input, $matches);
if ($m) $input=mb_encode_mimeheader($input,$charset, 'Q');
return $input;
}
otherwise, it removes wanted whitespace when there are Umlauts (äöüß) in the subject line