Last modified: 2007-11-02 14:01:27 UTC
I tried to annotate an article with Cyrillic letters and get in the DB question marks instead of right letters: 3 0 ????????_?????_1,_?????,_325?._?? SearchByRelation/SearchByRelation/?_???????? 0 325 53 0 ????????_?????_1,_?????,_325?._?? SearchByRelation/SearchByRelation/?_??????_?? 0 ?????????_?????????? 53 0 ????????_?????_1,_?????,_325?._?? SearchByRelation/SearchByRelation/?????? 0 ????????? When I tried to set type Date to one of the annotation properties I got an error message, saying something like: Error with the DB There was a syntactic error querying the DB. Last query was: (query hidden) at function: „SMW::getAllRelationSubjects“. MySQL return error „1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (localhost)“.
When I execute "names utf8" with phpMyBackupPro I can see the data in mw_page with right characters, but in mw_smw_relations it is full of ??????? stuff. If I understand right the data in mw_smw_relations got somehow collated with latin1, but it was entered in one and the same way as the page title and content. phpMyBackupPro: ----------------------------------------------------------------- Queries: set names utf8; select * from mw_smw_relations; select * from mw_page ; Query result 1: Successfully executed Number of affected rows: 0 Query result 2: subject_id subject_namespace subject_title relation_title object_namespace object_title 78 0 ????1 SearchByRelation/SearchByRelation/???_??_??? 0 ??_?????? Number of affected rows: 1 Query result 3: page_id page_namespace page_title page_restrictions page_counter page_is_redirect page_is_new page_random page_touched page_latest page_len 1 0 Начална_страница 328 0 0 0.979962178624 20071028214713 431 3476 2 10 AskLink 5 0 1 0.905750104132 20070923011859 3 194
More information is needed to reproduce this bug. I have created an annotation with the string "Начална_страница", and this worked properly in all contexts (page, browser, query). I believe my collation is also latin1 or swedish or something similarly uncyrillic throughout the MediaWiki-DB. Did you use the experimental UTF8-DB-Setup during installation? I do not think that this has been tested with SMW yet (and it is unstable for MediaWiki too -- but UTF8 is supported in any case, whatever the DB-format is).
If I remember right, perhaps I used UTF8-DB-Setup, but I am not quite sure. Is it possible to convert to the standard UTF8 now? I fixed my problem changing all the fields in the SMW tables to utf8 / general ci.