From 71c32c5b9a6d330493eb1893e43c9f3206c09834 Mon Sep 17 00:00:00 2001 From: maj00r Date: Tue, 3 Nov 2026 21:51:55 +0100 Subject: [PATCH] Read the old starter's key descriptions in code page 1250 too Its language files are code page 1250 as often as UTF-8. Read as UTF-8 only, Czech and Polish descriptions came out with replacement characters. --- StarterNG.Tests/LocalizationTests.cs | 14 ++++++++++++++ StarterNG/Services/LocalizationService.cs | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/StarterNG.Tests/LocalizationTests.cs b/StarterNG.Tests/LocalizationTests.cs index a5cc623..cdb5b90 100644 --- a/StarterNG.Tests/LocalizationTests.cs +++ b/StarterNG.Tests/LocalizationTests.cs @@ -190,6 +190,20 @@ public class LocalizationTests Assert.Equal(string.Empty, loc.Opt("Cmd.z")); } + [Fact] + public void An_old_starters_key_descriptions_are_read_in_its_own_code_page() + { + using var folders = new Folders(); + File.WriteAllText(Path.Combine(folders.Bundled, "en.xml"), English); + File.WriteAllBytes(Path.Combine(folders.OldStarter, "lang-cz.txt"), LegacyText.CodePage1250.GetBytes( + "[labels]\r\n