diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs
index 4c258dfbeb..a945784352 100644
--- a/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs
+++ b/framework/src/Volo.Abp.Core/Volo/Abp/IO/FileHelper.cs
@@ -4,6 +4,7 @@ using System.IO;
using System.Text;
using System.Threading.Tasks;
using JetBrains.Annotations;
+using Volo.Abp.Text;
namespace Volo.Abp.IO
{
@@ -120,5 +121,17 @@ namespace Volo.Abp.IO
return lines.ToArray();
}
+
+ ///
+ /// Opens a text file, reads content without BOM
+ ///
+ /// The file to open for reading.
+ /// A string containing all lines of the file.
+ public static async Task ReadFileWithoutBomAsync(string path)
+ {
+ var content = await ReadAllBytesAsync(path);
+
+ return StringHelper.ConvertFromBytesWithoutBom(content);
+ }
}
}
\ No newline at end of file