So you appear to have strings with different encodings in your database. That's really bad, because you won't get correct results from database queries until you get this fixed.
I have difficulties to understand why the regular expression does not change the result unless you are several levels of encoding away from the truth. This can happen if during the upgrade someone tried to fiddle with encoding until the result "looks right" in the browser - but what you actually have now is just a cancellation of errors. Encoding matters in the transfer from the browser form to the web application, when writing from the web application to the database, and in the opposite direction when reading from the database and when sending the data to your browser. Please tell us how you control encoding in these four places.
For obtaining some data for debugging, please print the data - good and bad - like this (also suggested by ikegami earlier in this thread):