Last modified: 2012-08-04 20:49:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12321, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10321 - pg_query() [function.pg-query]: Query failed: ERROR: invalid byte sequence for encoding "UTF8"
pg_query() [function.pg-query]: Query failed: ERROR: invalid byte sequence fo...
Status: RESOLVED DUPLICATE of bug 8716
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.10.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2007-06-20 16:56 UTC by tsh
Modified: 2012-08-04 20:49 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description tsh 2007-06-20 16:56:16 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}
============================================================================================
Comment 1 Brion Vibber 2007-06-20 18:01:44 UTC

*** This bug has been marked as a duplicate of bug 8716 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links