随笔分类 - 杂文
摘要:/// /// 把TXT GB2312文件转换成TXT UTF8文件 /// /// /// private void FileGB2312TOFileUTF8(string filepath, string filepath2) { filepath = Server.MapPath(filepath); filepath2 = Server.MapPath(filepath2); StreamReader inStream = new StreamReader(filepath, Encoding.GetEncoding(936));//GB2312 StreamWriter o...
阅读全文
摘要:把ANSI格式的TXT文件批量转换成UTF-8文件类型Posted on2010-08-05 10:38moss_tan_jun阅读(3635) 评论(0)编辑收藏#region 把ANSI格式的TXT文件批量转换成UTF-8文件类型 class FileControl { private string path = ""; private DirectoryInfo dirInfo = null; private FileInfo[] fileInfo = null; private string msg = ""; public string Msg
阅读全文
摘要:GB2312转换成UTF-8与utf_8转换成GB2312Posted on2010-08-05 10:37moss_tan_jun阅读(1116) 评论(0)编辑收藏/// /// utf_8转换成GB2312 /// /// /// private string ToGB2312(string utfInfo) { string gb2312Info = string.Empty; Encoding utf8 = Encoding.UTF8; Encoding gb2312 = Encoding.GetEncoding("gb2312"); byte[] unicode
阅读全文

浙公网安备 33010602011771号