Ok, after wasting my weekend and losing faith in mediawiki I think I've
found something.
As explained here:
http://groups.google.com/group/mailing.database.myodbc/browse_thread/thread…
MySQL4 won't swallow many queries that would work with mySQL3 because it's
pickier about collations.
I found myself in this situation:
mysql> SHOW VARIABLES LIKE 'character_set_%';
+�����������������C+������������������-+
| Variable_name | Value |
+�����������������C+������������������-+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_results | latin1 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | c:\mysql\share/charsets/ |
+�����������������C+������������������-+
7 rows in set (0.00 sec)
mysql> SHOW VARIABLES LIKE 'collation_%';
+��������������-+������������-+
| Variable_name | Value |
+��������������-+������������-+
| collation_connection | latin1_swedish_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+��������������-+������������-+
3 rows in set (0.00 sec)
To summarize...
In the file includes/Database.php , at the beginning of function doQuery(),
add:
mysql_query("SET NAMES 'utf8��;", $this->mConn );
Otherwise you just can't rely on the names of new pages being in the same
collation (usually latin1). This has given me several different errors and I
wouldn't rule out there might be possible injection attacks due to this.
Please somebody, warn about mySQL4 being not properly tested in bold font in
the requirements section.
On 2/4/06, muyuubyou <muyuubyou(a)gmail.com> wrote:
Oh BTW I'm using MySQL 4.1, I suspect the problem is there :(
Can you guys try to create a chinese page? try copy-pasting this: �h�Z
On 2/4/06, muyuubyou <muyuubyou(a)gmail.com > wrote:
No, I didn't manually touch that. I just checked it out. Thanks for the
swift reply anyway :)
On 2/4/06, Brion Vibber < brion(a)pobox.com> wrote:
muyuubyou wrote:
When I try to create a Chinese or Japanese page I
get this error:
Error in numRows(): Illegal mix of collations (utf8_bin,IMPLICIT)
and
(latin1_swedish_ci,COERCIBLE) for operation
'='
Did you change the character set configuration of MySQL or the tables?
Don't do
that. MediaWiki uses UTF-8, but doesn't pay much attention to what
MySQL thinks
the charset is; under the old "latin-1" default it'll run good clean
binary
UTF-8 on top of that with few problems. Under the experimental MySQL 5
mode it
can use tables which are set up as UTF-8. Don't try to mix these
modes.
-- brion vibber (brion @
pobox.com)
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l