https://bugzilla.wikimedia.org/show_bug.cgi?id=32207

--- Comment #2 from Christian Boltz <[email protected]> 2011-11-04 
18:34:33 UTC ---
Interestingly it works for me on the shell - the output is "LIKE 'Möhre'".

I'm using MySQL 5.0.67. My config isn't very special IMHO, maybe except this:

[client]
default-character-set=latin1
[mysqld]
default-character-set=latin1
default-collation=latin1_german1_ci

Note that this is just a default, and any client (including mediawiki) can
specify the charset to use when connecting to MySQL.

On the mediawiki side, my configuration is quite boring and doesn't contain
anything related to the charset.

In the meantime I noticed that PHP's error_log() escapes special characters
(like umlauts) - if I just echo out the query, it contains "Möhre" in valid
UTF-8.
In other words: there must be something wrong on the way between mediawiki and
mysql. Let me check...

# show create table page
[...]
  `page_title` varchar(255) character set latin1 collate latin1_bin NOT NULL,
[...]
) ENGINE=MyISAM AUTO_INCREMENT=6244 DEFAULT CHARSET=latin1
COLLATE=latin1_general_ci

In other words: The page_title is latin1 (aka ISO-8815-1) in the database,
which matches my mySQL defaults.

# select page_title from page where page_title like '%hre%';
+----------------------------------------------------+
| page_title                                         |
+----------------------------------------------------+
| Möhre                                             | 
[...]

Yes, the UTF-8 sequence for "ö" is really displayed as two bytes :-(
Looks like mediawiki didn't tell mysql that it will hand over UTF-8 strings,
and MySQL handled them as ISO-8859-1 then...

In case it matters: The wiki was started in 2009 (IIRC MediaWiki 1.14) and
updated since then.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to