← Back

Not so smart quotes

I've had a bit of a headache just recently, converting an MS Access database to a MySQL one. I used a helpful little tool called dataloader on a virtual machine to get the mysql dump out but smart quotes and other characters outside of the standard ascii set didn't import correctly into mysql. In fact, it just truncated the contents of that field an the point that it encountered the offending character.

I've messed about trying to search and replace things with sed and similar but I haven't got the time to be messing around writing a script to do it. As a result, I've just used the Vim editor to do a find and replace of the ones that have affected me.

Here's a list of a few search/replace commands that have sorted me out today:


Hope it helps someone out.