I am having a problem with hidden characters (spaces) other than ASCII in my database.
How can I replace them with regular spaces and convert them before inserting them to avoid future problems?
I'm still not 100% sure what is happening, but I think this is not in ASCII spaces. Any tips on tracking it will help.
Here's what happens:
I have a database with keywords, and if I search for "test keyword", nothing appears. I know that the "test keyword" is in the database.
If I search for “test” or “keyword”, it will be displayed.
If I make a request with:
SELECT * FROM keywords WHERE keyword regexp '[^ -~]'; ( found here )
It will display a “test keyword” - giving me the conclusion that there is a non-ASCII character with a space in the “keyword”.
source share