Fix to deal with special characters and encoding.