using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dome
{
class Program
{
static void Main(string[] args)
{
EncodingInfo[] info = System.Text.Encoding.GetEncodings();
List<string> list = new List<string>();
for (int i = 0; i < info.Length; i++)
{
list.Add(info[i].CodePage + "\t" + info[i].DisplayName + "\t" + info[i].Name);
}
File.WriteAllLines(@"d:\Encoding.txt",list.ToArray());
}
}
}
原文链接: http://blog.csdn.net/mypc2010/article/details/8001013