Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Why page title are stored in binary format instead of char format in MediaWiki? http://www.mediawiki.org/wiki/Manual:Page_table#page_title

SELECT page_id, BINARY CONVERT(page_title USING utf8) as page_title ...

Is there any advantage or general benefit?

share|improve this question
@JoachimIsaksson "Works with any character encoding " ?? Is there any thing wrong with storing char? – PHPst Jun 4 at 6:04
Ah, in your edit it shows that it encodes it in UTF8 anyway when encoding to binary... so the encoding thing is probably not a reason. – Joachim Isaksson Jun 4 at 6:07
Otherwise, a char is not always the same, the encoding of it depends on the character set encoding you're using. UTF8 is almost always a good choice though, since it has most characters. – Joachim Isaksson Jun 4 at 6:09

1 Answer

up vote 3 down vote accepted

Because MySQL's utf8 collation doesn't support characters outside of Basic Multilingual Plane and utf8mb4 which does was added only recently, in MySQL 5.5.3. And in MySQL's implementation "doesn't support" means "mangled text".

share|improve this answer
Thanks. Can you please add a link to show this is the only reason for that? – PHPst 13 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.