C#讀取txt文件時中文亂碼

解決辦法編碼

使用GB2312中文字符集coding

StreamReader reader = new StreamReader(txtUrl, Encoding.GetEncoding("gb2312"));file

或使用默認編碼格式di

StreamReader sR = new StreamReader(filePath, System.Text.Encoding.Default)字符集

相關文章
相關標籤/搜索