Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing string in binary format in MySQL

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?

like image 275
Handsome Nerd Avatar asked Nov 21 '25 04:11

Handsome Nerd


1 Answers

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".

like image 102
MaxSem Avatar answered Nov 23 '25 12:11

MaxSem



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!