From 776fd30e5c44d10db857d53574860beb13a5fb99 Mon Sep 17 00:00:00 2001 From: palacex Date: Thu, 1 Feb 2024 01:58:09 +0300 Subject: [PATCH] Error on load book then is has windows-1521 codepage. (#16) --- samples/FBLibrary.Sample.ConsoleApp/Program.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/FBLibrary.Sample.ConsoleApp/Program.cs b/samples/FBLibrary.Sample.ConsoleApp/Program.cs index 253e7ed..0d60b99 100644 --- a/samples/FBLibrary.Sample.ConsoleApp/Program.cs +++ b/samples/FBLibrary.Sample.ConsoleApp/Program.cs @@ -2,11 +2,16 @@ using System.Drawing; using System.Drawing.Imaging; using System.IO; +using System.Text; using System.Xml; using FB2Library; using FB2Library.Elements; + +Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); + var filePath = Path.Combine("..", "..", "..", "..", "..", "files", "test.fb2"); + await using var fileStream = new FileStream(filePath, FileMode.Open); var readerSettings = new XmlReaderSettings