On a WordPress site I want to replace " !" and " ?" by " !" and " ?". The challenge is that the replacement string not uses a common space char but a thin space char (U+2009).
PHPMyAdmin is used for database editing with this query:
UPDATE wp_posts SET post_content = REPLACE (post_content,' !',' !');
(Yes, it's the correct thin space char, but Courier is a fixed-width font not showing a difference.)
It seems that PHPMyAdmin is not correctly handling the special char, because simulating the query delivers zero hits.
But trying another replace query works, so the statement should be correct. Tables are using "utf8mb4_unicode_ci" as collation, which seems to be the default and correct setting of WordPress. Database server is MariaDB (10.1.26).
I'm not familiar enough how to specify Unicode chars in SQL queries. Can someone help me out there?
REPLACE(post_content, ' !', CHAR(0222))
would replace your bangs (!) with thorns (Þ ). I don't know of a place I can test this for MariaDB though. If that works, you would just need to know the integer value for the unicode char.