schangxiang@126.com
2025-05-09 a0088a63163bd3467529306f98a8cdb98b497e33
Weben_CMSרÓôúÂëÉú³ÉÆ÷/Code/Utility/TextHelper.cs
@@ -180,8 +180,7 @@
        /// <param name="entityName">实体类名</param>
        /// <param name="modulelogo">模块名字</param>
        /// <returns></returns>
        public static bool Export2File_V2(string _strPath,string fileName, string _tableName, string _code, FileType fileType,
            string filePrefixName, string entityName, string modulelogo)
        public static bool Export2File_V2(string _strPath, string fileName,string _code)
        {
            string fileFolderPath = _strPath + "\\";
@@ -265,7 +264,12 @@
                Directory.CreateDirectory(fileFolderPath);
            }
            string filePath = fileFolderPath + "\\" + fileName;
            using (StreamWriter outfile = new StreamWriter(filePath, false, Encoding.GetEncoding("UTF-8")))
            //using (StreamWriter outfile = new StreamWriter(filePath, false, Encoding.GetEncoding("UTF-8")))
            //{
            //    outfile.Write(_code);
            //}
            //修复为啥这样生成的文件。类型是 UTF-8-BOM,而不是UTF-8问题 ã€Editby shaocx,2025-05-06】
            using (StreamWriter outfile = new StreamWriter(filePath, false, new UTF8Encoding(false)))
            {
                outfile.Write(_code);
            }