Illegal mix of collations error in Low Search
Hi Low
I'm having some trouble with Low Search when using some non-english words as keywords.
If I tried to input words such as "Cổ điển" (means "classic" in Vietnamese), I got this error:
Error Number: 1267
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'
SELECT entry_id, collection_id, index_text FROM ('exp_low_search_indexes') WHERE 'collection_id' IN ('1') AND 'site_id' IN (1) AND ( (index_text LIKE '% cổ%') AND (index_text LIKE '% điển%') )
Filename: third_party/low_search/mod.low_search.php
Line Number: 554
Can you diagnose the problem?
Thanks!
Replies
Low 7 Jan 2013 08:07
Can you check the DB using PhpMyAdmin or Sequel Pro and check what the collation is of the 'index_text' field in the exp_low_search_indexes table? If it's not utf8_general_ci, you can try and convert it to that.
QuốcHưngLê 7 Jan 2013 08:24
Hi Low,
Thanks for the quick respond!
It works like a charm now!
Cheers!
Low 7 Jan 2013 08:26
Cool.
Also take note that when you're creating new databases (for EE specifically), be sure to set the default collation to utf8 / utf8_general_ci.
QuốcHưngLê 7 Jan 2013 08:28
Sounds like a good plan to me!
Thanks!