dc_jt Posted April 9, 2009 Share Posted April 9, 2009 Hi I have recently imported a lot of data into my database, however a lot of the content contains characters such as � and ¿½ etc. These seem to be the apostrophes and speech marks. I have tried using a str_replace to replace them with the correct html for an apostrophe or a speech mark but it doesnt seem to work. Any ideas what I can do? Thanks Quote Link to comment Share on other sites More sharing options...
WolfRage Posted April 9, 2009 Share Posted April 9, 2009 You can try converting the tables to utf8_bin... Also make sure you are using a UTF8 connection, this provides the broadest range of character support. Quote Link to comment Share on other sites More sharing options...
dc_jt Posted April 9, 2009 Author Share Posted April 9, 2009 You can try converting the tables to utf8_bin... Also make sure you are using a UTF8 connection, this provides the broadest range of character support. Thanks but im not quite sure how I would do this? Would I have to re-import the data? Is there anyway I can simply encode the characters on the front end when I echo it out? Quote Link to comment Share on other sites More sharing options...
WolfRage Posted April 11, 2009 Share Posted April 11, 2009 Do you have PHPMyAdmin? If so it can convert the tables for you, other wise just look for a similar conversion script and apply it to the tables. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted April 11, 2009 Share Posted April 11, 2009 Sounds like you've got Microsoft's "smart quotes syndrome" Using Google you can find quite a few scripts to go through and replace all these codes with proper characters. I recall a similar problem a while back on here and some handy code was posted - try searching for it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.