[file encoding] added encoding option & used chardet for Text/Markdown/Sf file