Skip to content
Snippets Groups Projects
Unverified Commit b58251df authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #5132 from JediKev/issue/umlauts-subject-line

issue: Umlauts In Subject
parents fe28bc52 cccdb152
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,11 @@ class Format { ...@@ -43,6 +43,11 @@ class Format {
} }
function mimedecode($text, $encoding='UTF-8') { function mimedecode($text, $encoding='UTF-8') {
// Handle poorly or completely un-encoded header values (
if (function_exists('mb_detect_encoding'))
if (($src_enc = mb_detect_encoding($text))
&& (strcasecmp($src_enc, 'ASCII') !== 0))
return Charset::transcode($text, $src_enc, $encoding);
if(function_exists('imap_mime_header_decode') if(function_exists('imap_mime_header_decode')
&& ($parts = imap_mime_header_decode($text))) { && ($parts = imap_mime_header_decode($text))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment