Last modified: 2012-08-04 20:49:09 UTC
I'm using a Postgresql on the backend with UTF8 db The problem arises with texvc. It looks like this dynamic SQL SELECT math_outputhash,math_html_conservativeness,math_html,math_mathml FROM math WHERE math_inputhash = '��FP ���P����� ' causes serious problem with postgres. I think that WHERE clause has to be rewritten from dynamic SQL to a query with MATH_INPUTHASH value as a parameter. I looked through the code and can't see an easy way to do it nicely. Here is an error page with error detalization ============================================================================================== Warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid byte sequence for encoding "UTF8": 0xb3 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". in /var/www/mediawiki-1.10.0/includes/DatabasePostgres.php on line 496 Internal error A database error has occurred Query: SELECT math_outputhash,math_html_conservativeness,math_html,math_mathml FROM math WHERE math_inputhash = '��FP ���P����� ' LIMIT 1 Function: MathRenderer::_recall Error: 1 ERROR: invalid byte sequence for encoding "UTF8": 0xb3 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". Backtrace: #0 /var/www/mediawiki-1.10.0/includes/Database.php(761): DatabasePostgres->reportQueryError('ERROR: invalid...', 1, 'SELECT math_ou...', 'MathRenderer::_...', false) #1 /var/www/mediawiki-1.10.0/includes/Database.php(1179): Database->query('SELECT math_ou...', 'MathRenderer::_...') #2 /var/www/mediawiki-1.10.0/includes/Database.php(1198): Database->select('math', Array, Array, 'MathRenderer::_...', Array) #3 /var/www/mediawiki-1.10.0/includes/Math.php(191): Database->selectRow('math', Array, Array, 'MathRenderer::_...') #4 /var/www/mediawiki-1.10.0/includes/Math.php(44): MathRenderer->_recall() #5 /var/www/mediawiki-1.10.0/includes/Math.php(269): MathRenderer->render() #6 /var/www/mediawiki-1.10.0/includes/Parser.php(590): MathRenderer::renderMath('\int\limits_0^1...') #7 /var/www/mediawiki-1.10.0/includes/Parser.php(300): Parser->strip(':<math>\int\lim...', Object(StripState)) #8 /var/www/mediawiki-1.10.0/includes/Article.php(2898): Parser->parse(':<math>\int\lim...', Object(Title), Object(ParserOptions), true, true, 16) #9 /var/www/mediawiki-1.10.0/includes/Article.php(796): Article->outputWikiText(':<math>\int\lim...') #10 /var/www/mediawiki-1.10.0/includes/Wiki.php(378): Article->view() #11 /var/www/mediawiki-1.10.0/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest)) #12 /var/www/mediawiki-1.10.0/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest)) #13 {main} ============================================================================================
*** This bug has been marked as a duplicate of bug 8716 ***