mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-05 21:29:09 +01:00
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.
This commit is contained in:
@@ -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<eu07_input-keyboard.ini\r\nhornhighactivate=Houkačka výšková\r\n\r\n"));
|
||||
var loc = folders.Service();
|
||||
|
||||
loc.Load("cz");
|
||||
|
||||
Assert.Equal("Houkačka výšková", loc.Opt("Cmd.hornhighactivate"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Of_the_simulators_files_only_a_language_code_counts()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user