Fixed a bug when the encoding is not set in the config file.