if default_charsets is not Null, dump the file contents to temp files,
try to decode by charsets in default_charsets, decide which charset
is used, and convert utf8 by specifying the charset by input encoding.