Fix connection issues, set character set, fix escape strings.