Convert double to single quotes with character escaping