swetha Posted December 17, 2009 Share Posted December 17, 2009 Hellomy database got filled with strange characters like this ’ … – “ †‘ my database collections are "utf8_unicode_ci".how can i remove these characters?Thanks in advance. Swetha Link to comment Share on other sites More sharing options...
justsomeguy Posted December 17, 2009 Share Posted December 17, 2009 You could probably use one of the string replace functions for whichever database you're using. e.g., MySQL has this:http://dev.mysql.com/doc/refman/5.0/en/str...unction_replace Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted December 17, 2009 Share Posted December 17, 2009 I had a similar issue when populating a database from an external feed that I had no control over but should have had the correct UTF8. If you are doing a similar thing then you could adjust the data as it is entered into the database mysql_query("UPDATE tablename SET NAME = REPLACE(NAME,'–','') WHERE NAME LIKE '%–%'"); Link to comment Share on other sites More sharing options...
swetha Posted December 25, 2009 Author Share Posted December 25, 2009 Thanks for ur help.i removed the characters,but some 'square boxes' are there.how to remove that boxes?Once again thanks for ur help. I had a similar issue when populating a database from an external feed that I had no control over but should have had the correct UTF8. If you are doing a similar thing then you could adjust the data as it is entered into the databasemysql_query("UPDATE tablename SET NAME = REPLACE(NAME,'–','') WHERE NAME LIKE '%–%'"); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.