How to guess the encoding of a file with no BOM in .NET?

前端 未结 8 644
野趣味
野趣味 2020-12-14 13:07

I\'m using the StreamReader class in .NET like this:

using( StreamReader reader = new StreamReader( \"c:\\somefile.html\", true ) {
    string filetext = rea         


        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 14:01

    I used this to do something similar a while back:

    http://www.conceptdevelopment.net/Localization/NCharDet/

提交回复
热议问题