Big Bug Ban

兴趣 践行 创新

C# 文件 写入文件时的编码

 

StreamWriter sw = new StreamWriter(new FileStream(jug.path.tmppath + filename + ".cpp",

FileMode.Create),System.Text.Encoding.GetEncoding("gb2312"));

就这一句..

主要的地方是StreamWriter的构造函数StreamWriter ( FileStream , Encoding )

Written by princehaku

12月 22nd, 2009 at 8:59 上午

Posted in c/c++

Tagged with

without comments

Leave a Reply