The easiest and in my opinion best solution is to not allow special characters in column names. Otherwise you'll have to always be on the lookout for column names that break SQL standard or break MySQL at some stage. So to avoid your program getting criticised later (by users), only allow a-zA-Z and underscore. It will be difficult to change to this precautionary naming later, when you already have many funky name columns in tables.
the hardest line to type correctly is: stty erase ^H