Community

Simple Search - Case Insensitive problem

Summary

My Simple search is case sensitive, so if I search for product ‘abc’, it doesn’t find product ‘ABC’. I thought it was to do with the collation of the database, as it was UTF8_bin - so I have changed it to UTF8_general_ci - but it’s still case sensitive.

Environment

I’m using the latest version of modx 2.7.1 a d simple search is also the latest

Can anyone advise?
Thanks

Andy

1 Like

Quick update. The collation of the database and tables are now UTF8_general_ci, but some of the columns within the individual tables are still UTF8_bin.

When I ticked the box in PhpMyAdmin to change collation on all columns, I get this error (attached)55

1 Like

You have to be very careful changing collation, and I am not sure here it will help? Maybe go back…possibly?

When I had to port data, collation was a huge problem, I guess I was in Latin but had Chinese content, maybe not applicable to your case. I was moving into a utf database, as I should have been in originally, sigh.

With my case, characters like, I can’t remember exactly, but stuff like semi-colons led to any following contents being lost.

Anyway, its definitely not trivial to do so with an active database.

As far as I know, the script here still works to convert a MODX database character set. It uses UTF8_general_ci by default, though I’m not sure the collation is your issue.

1 Like

Thanks Bob. I actually managed to manually change the collation of the individual column that simple search uses for product numbers - and it worked!
I will keep that script though, as it sounds a bit easier than the way I did it.

Thanks
Andy

Thanks. It was going from utf8_bin to utf8_general_ci - so I think it’s fairly safe (going from utf8 to utf8) but I did back everything up first of course.

1 Like

Yeah you were right, I was way off base