Skip to content

Commit

Permalink
Even smarter determination of charset for source view
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 31, 2014
1 parent c4fa9d6 commit e5f2faf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion imp/lib/Contents/View.php
Expand Up @@ -184,12 +184,14 @@ public function viewSource()

$session->close();

$charset = $this->_contents->getMIMEMessage()->getCharset();

return array(
'data' => $this->_contents->fullMessageText(array(
'stream' => true
)),
'name' => _("Message Source"),
'type' => 'text/plain; charset=UTF-8'
'type' => 'text/plain; charset=' . (is_null($charset) ? 'UTF-8' : $charset)
);
}

Expand Down

0 comments on commit e5f2faf

Please sign in to comment.