Author: ole
Description:
On a postgres-based install (UTF-8 encoding), the database barfs on binary
values for the math_inputhash and math_outputhash columns in the SQL, reporting
invalid UTF-8 chars; the byte arrays need to be escaped with pg_escape_bytea()
A database error has occurred Query: SELECT
math_outputhash,math_html_conservativeness,math_html,math_mathml FROM math WHERE
math_inputhash = '� |(�ɖ\x17�\x1ce\x06�\\�' LIMIT 1 Function: MathRenderer::_recall
Error: 1 ERROR: invalid byte sequence for encoding "UTF8": 0xce0d
Backtrace:
#0 /storage/www/htdocs/wiki/includes/Database.php(761):
DatabasePostgres->reportQueryError('ERROR: invalid...', 1, 'SELECT math_ou...',
'MathRenderer::_...', false)
#1 /storage/www/htdocs/wiki/includes/Database.php(1179): Database->query('SELECT
math_ou...', 'MathRenderer::_...')
#2 /storage/www/htdocs/wiki/includes/Database.php(1198):
Database->select('math', Array, Array, 'MathRenderer::_...', Array)
#3 /storage/www/htdocs/wiki/includes/Math.php(191): Database->selectRow('math',
Array, Array, 'MathRenderer::_...')
#4 /storage/www/htdocs/wiki/includes/Math.php(44): MathRenderer->_recall()
#5 /storage/www/htdocs/wiki/includes/Math.php(269): MathRenderer->render()
#6 /storage/www/htdocs/wiki/includes/Parser.php(590):
MathRenderer::renderMath('Insert formula ...')
#7 /storage/www/htdocs/wiki/includes/Parser.php(300): Parser->strip('This
section de...', Object(StripState))
#8 /storage/www/htdocs/wiki/includes/Article.php(2289): Parser->parse('This
section de...', Object(Title), Object(ParserOptions), true, true, 30)
#9 /storage/www/htdocs/wiki/includes/Article.php(1380):
Article->editUpdates('This section de...', '', true, '20070514154832', 30, false)
#10 /storage/www/htdocs/wiki/includes/Article.php(1205): Article->doEdit('This
section de...', '', 102)
#11 /storage/www/htdocs/wiki/includes/EditPage.php(865):
Article->updateArticle('This section de...', '', true, false, '', '')
#12 /storage/www/htdocs/wiki/includes/EditPage.php(426): EditPage->attemptSave()
#13 /storage/www/htdocs/wiki/includes/EditPage.php(279): EditPage->edit()
#14 /storage/www/htdocs/wiki/includes/Wiki.php(432): EditPage->submit()
#15 /storage/www/htdocs/wiki/includes/Wiki.php(48):
MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title),
Object(User), Object(WebRequest))
#16 /storage/www/htdocs/wiki/index.php(89): MediaWiki->initialize(Object(Title),
Object(OutputPage), Object(User), Object(WebRequest))
#17 {main}
Version: 1.10.x
Severity: normal
OS: Linux
Platform: PC