I'm developing a website and have been given a large dataset to use.
I've put it in a MySQL table, but when it's displayed on a webpage sometimes spaces (as in the space bar) are shown as � (you might not see the same symbol I do if it's character set problem, it's a black diamond with a white question mark in it).
These don't show in phpMyAdmin when I look at the data, they just show as normal spaces.
I've doing an "UPDATE table SET field = REPLACE(field, '�', ' ')" query to replace them, but it won't work.
At first I got a character encoding miss-match error, I changed the table to UTF-8 hoping it would help, it removed the miss-match error but not the problem. Now, that query runs but doesn't affect any rows, as if the two characters are identical.
How can I sort this out?
The field should only currently have 0-9 and spaces in it.
Would it be possible to replace anything that isn't one of these with a standard space?
I've put it in a MySQL table, but when it's displayed on a webpage sometimes spaces (as in the space bar) are shown as � (you might not see the same symbol I do if it's character set problem, it's a black diamond with a white question mark in it).
These don't show in phpMyAdmin when I look at the data, they just show as normal spaces.
I've doing an "UPDATE table SET field = REPLACE(field, '�', ' ')" query to replace them, but it won't work.
At first I got a character encoding miss-match error, I changed the table to UTF-8 hoping it would help, it removed the miss-match error but not the problem. Now, that query runs but doesn't affect any rows, as if the two characters are identical.
How can I sort this out?
The field should only currently have 0-9 and spaces in it.
Would it be possible to replace anything that isn't one of these with a standard space?