mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-08 14:59:40 +01:00
fallback decode utf8 strict to win 1250
This commit is contained in:
@@ -16,7 +16,6 @@ public sealed class TexturesTxtVehicleRepository : IVehicleRepository
|
||||
private readonly IGamePaths _paths;
|
||||
private readonly IDiagnosticsLog _log;
|
||||
private readonly TexturesTxtParser _parser;
|
||||
private readonly Encoding _encoding;
|
||||
|
||||
public TexturesTxtVehicleRepository(IFileSystem files, IGamePaths paths, IDiagnosticsLog log,
|
||||
TexturesTxtParser parser)
|
||||
@@ -25,7 +24,6 @@ public sealed class TexturesTxtVehicleRepository : IVehicleRepository
|
||||
_paths = paths;
|
||||
_log = log;
|
||||
_parser = parser;
|
||||
_encoding = LegacyText.CodePage1250;
|
||||
}
|
||||
|
||||
public int Load(VehicleCatalog catalog)
|
||||
@@ -51,7 +49,7 @@ public sealed class TexturesTxtVehicleRepository : IVehicleRepository
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] lines = _files.ReadAllText(path, _encoding).Split('\n');
|
||||
string[] lines = LegacyText.Decode(_files.ReadAllBytes(path)).Split('\n');
|
||||
return _parser.Parse(RelativeDirectory(path), lines);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user