From e0c6bff0b90f2415f7fb4a47cd98999724919def Mon Sep 17 00:00:00 2001 From: morkt Date: Sun, 16 Sep 2018 20:06:23 +0400 Subject: [PATCH] (NOA): force cp932 encoding for older archives. --- ArcFormats/Entis/ArcNOA.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArcFormats/Entis/ArcNOA.cs b/ArcFormats/Entis/ArcNOA.cs index 4c197b3d..4ee84292 100644 --- a/ArcFormats/Entis/ArcNOA.cs +++ b/ArcFormats/Entis/ArcNOA.cs @@ -93,7 +93,9 @@ namespace GameRes.Formats.Entis uint id = file.View.ReadUInt32 (8); if (0x02000400 != id) return null; - var reader = new IndexReader (file, NoaEncoding.Get()); + bool old_format = file.View.AsciiEqual (0x10, "EMSAC-Binary Archive"); + Encoding enc = old_format ? Encodings.cp932 : NoaEncoding.Get(); + var reader = new IndexReader (file, enc); if (!reader.ParseRoot() || 0 == reader.Dir.Count) return null; if (reader.HasEncrypted)