文件编码

问题描述:

在我的项目中,"Baltic(windows)代码页1257"中保存的文件后面有很多代码,而具有签名代码页65001的unicode"中保存的aspx文件后面有很多代码.
我想确定每个文件代码页.我已经尝试了StreamReader及其bom(字节顺序标记).我完全知道我的文件之一是"Baltic(windows)",使用代码页1257进行编码,但是StreamReader向我显示它类似于65001.问题是如何确定文件代码页?

In my project there are a lot of code behind files saved in "Baltic (windows) codepage 1257", and aspx files saved in "unicode with signature codepage 65001".
I would like to determine every file code page. I already tried StreamReader, and its bom(byte order mark). I exactly know that one of my files is "Baltic(windows)" encoding with code page 1257, but StreamReader shows me it like 65001. Question is how do i determine file code page? 

您的最终目标是什么?也许其他解决方案不涉及创建C#应用程序.
What is your ultimate goal? Maybe a different solution doesn't involve creating a C# applicaton.