Utils: Add UTF8 encoding without BOM

This commit is contained in:
2023-09-07 16:39:49 +02:00
parent de53bfdd2b
commit 8a678509c5
3 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,6 @@ using System;
using System.Threading.Tasks;
using System.IO;
using Elwig.Helpers;
using System.Text;
namespace Elwig.Documents {
public abstract class Document : IDisposable {
@ -63,7 +62,7 @@ namespace Elwig.Documents {
public async Task Generate() {
var pdf = new TempFile("pdf");
using (var tmpHtml = new TempFile("html")) {
await File.WriteAllTextAsync(tmpHtml.FilePath, await Render(), Encoding.UTF8);
await File.WriteAllTextAsync(tmpHtml.FilePath, await Render(), Utils.UTF8);
await Pdf.Convert(tmpHtml.FilePath, pdf.FilePath);
}
PdfFile = pdf;