auto detect the file encoding format and iconv it to specified encoding format