Although the contents of error messages are English text,
and thus it's irrelevant that it gets interpreted as
iso-8859-1 instead of utf-8, $wgSitename is printed by
DBConnectionError::searchForm(), and that can contain utf-8.
Cached pages may also be in utf-8.
Change-Id: I81c02493f0824cb010c80f4356f338787d78df6b
* It will be either HTML or plain text based on isCommandLine().
*/
function report() {
- global $wgLogExceptionBacktrace;
+ global $wgLogExceptionBacktrace, $wgMimeType;
$log = $this->getLogMessage();
if ( $log ) {
} else {
header( "HTTP/1.1 500 MediaWiki exception" );
header( "Status: 500 MediaWiki exception", true );
+ header( "Content-Type: $wgMimeType; charset=utf-8", true );
$this->reportHTML();
}