Page MenuHomePhabricator

UTF8-DB-Collation does not work with SMW
Closed, ResolvedPublic

Description

Author: some_777

Description:
Special:Browse crashes when used with Cyrillic characters

Error when querying the database
There was a syntactic error querying the database. The last query was:

(query hidden)

in function „SMW::getInRelations“. MySQL returns error „1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (localhost)“.

orig. error:
(Грешка при работа с базата от данни
Възникна синтактична грешка при заявка към базата от данни. Последната заявка към базата от данни беше:

(Заявка на SQL — скрита)

при функцията „SMW::getInRelations“. MySQL дава грешка „1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (localhost)“.)


MediaWiki: 1.11.0rc1
PHP: 5.1.6 (apache2handler)
MySQL: 5.0.27-Debian_0.dotdeb.1

Semantic MediaWiki (version 0.7) Making your wiki more accessible – for machines and humans. View online documentation. Klaus Lassleben, Markus Krötzsch, Denny Vrandecic, S Page, and others. Maintained by AIFB Karlsruhe.

Semantic MediaWiki (version 0.7) Making your wiki more accessible – for machines and humans. View online documentation. Klaus Lassleben, Markus Krötzsch, Denny Vrandecic, S Page, and others. Maintained by AIFB Karlsruhe.

Semantic MediaWiki (version 0.7) Making your wiki more accessible – for machines and humans. View online documentation. Klaus Lassleben, Markus Krötzsch, Denny Vrandecic, S Page, and others. Maintained by AIFB Karlsruhe.

( why three entries for SMW in Special:Version ?? )


Version: unspecified
Severity: critical
OS: Linux
Platform: PC

Details

Reference
bz11812

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:56 PM
bzimport set Reference to bz11812.
bzimport added a subscriber: Unknown Object (MLST).

This problem is due to incompatible "collations" in your database, and has nothing to do with the actual characters you use. SMW does not set the DB collation at all, and normally MediaWiki (I think) does the same. Maybe you selected the experimental UTF8-DB-setup when installing MediaWiki? This feature is not stable, and is currently not supported for SMW. This could be changed when the UTF8-DB option becomes more mature for MediaWiki.

Note that the DB-level UTF8-setup is not required for using UTF8 in any wiki page -- it just might make better use of the DBs capabilities once it is working.

  • Bug 19085 has been marked as a duplicate of this bug. ***
  • Bug 17910 has been marked as a duplicate of this bug. ***

tantin.david wrote:

Hi, I don't know if my problem is linked, but when I set a property name with accented characters, it doesn't display in the Browsing page. See this test page : http://sandbox.semantic-mediawiki.org/wiki/Special:Browse/Accent (property name doesn't appear in the left column :/).

(In reply to comment #4)

Hi, I don't know if my problem is linked, but when I set a property name with
accented characters, it doesn't display in the Browsing page. See this test
page : http://sandbox.semantic-mediawiki.org/wiki/Special:Browse/Accent
(property name doesn't appear in the left column :/).

No, this is an unrelated bug that has been fixed in the meantime. See Bug 20795.

someone3.0 wrote:

Patch for SMW1.4.3 that fixes encoding and table type setting

The attached patch uses the mediawiki $wgTableOptions setting to enable SMW to create its additional tables witch the same options (table type and encoding) used in the Mediawiki configuration. Tested with Mediawiki 1.15.1 and SMW 1.4.3, using latin-bin and UTF-8-tables, wich are the recommended settings during Mediawiki installation (MySQL only). see also: http://www.mediawiki.org/wiki/Manual:$wgDBTableOptions

Attached:

Thanks, I have applied the patch to SVN. Lets hope that this solves the problem in all cases.