From 06671c8aa40193fc2dc37c377eb727f4f5975e94 Mon Sep 17 00:00:00 2001 From: ForNeVeR Date: Sat, 17 May 2014 17:11:29 +0700 Subject: [PATCH] Fix encoding problems with ZipFile. Without setting the DefaultCodePage it may cause problems on systems without 866 code page installed. --- OpenRA.Game/FileSystem/ZipFile.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Game/FileSystem/ZipFile.cs b/OpenRA.Game/FileSystem/ZipFile.cs index 3df4552e3a..8859ba2a53 100644 --- a/OpenRA.Game/FileSystem/ZipFile.cs +++ b/OpenRA.Game/FileSystem/ZipFile.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.IO; +using System.Text; using ICSharpCode.SharpZipLib.Zip; using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile; @@ -21,6 +22,11 @@ namespace OpenRA.FileSystem SZipFile pkg; int priority; + static ZipFile() + { + ZipConstants.DefaultCodePage = Encoding.Default.CodePage; + } + public ZipFile(string filename, int priority) { this.filename = filename;