Fix the way we set character encoding for MySQL #1860