https://www.nuget.org/packages/SimpleHelpers.FileEncoding/
安装方式:
-------------------------------- 作者在 2018-06-06 09:40:40 补充以下内容 --------------------------------
示例:
public static void Main(String[] args) { string filename = args[0]; using (FileStream fs = File.OpenRead(filename)) { Ude.CharsetDetector cdet = new Ude.CharsetDetector(); cdet.Feed(fs); cdet.DataEnd(); if (cdet.Charset != null) { Console.WriteLine("Charset: {0},confidence: {1}",cdet.Charset,cdet.Confidence); } else { Console.WriteLine("Detection Failed."); } } }原文链接:https://www.f2er.com/windows/566672.html