From 91030ca8300557a1e03e17fb34167c16577aad45 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 12 5月 2025 11:46:16 +0800
Subject: [PATCH] 优化代码
---
Weben_CMS专用代码生成器/Code/Utility/TextHelper.cs | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/TextHelper.cs" "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/TextHelper.cs"
index 73b5056..69ada04 100644
--- "a/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/Code/Utility/TextHelper.cs"
+++ "b/Weben_CMS\344\270\223\347\224\250\344\273\243\347\240\201\347\224\237\346\210\220\345\231\250/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锛岃�屼笉鏄疷TF-8闂 銆怑ditby shaocx,2025-05-06銆�
+ using (StreamWriter outfile = new StreamWriter(filePath, false, new UTF8Encoding(false)))
{
outfile.Write(_code);
}
--
Gitblit v1.9.3