Fix encoding problems with ZipFile.
Without setting the DefaultCodePage it may cause problems on systems without 866 code page installed.
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
using ICSharpCode.SharpZipLib.Zip;
|
using ICSharpCode.SharpZipLib.Zip;
|
||||||
using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
|
using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
|
||||||
|
|
||||||
@@ -21,6 +22,11 @@ namespace OpenRA.FileSystem
|
|||||||
SZipFile pkg;
|
SZipFile pkg;
|
||||||
int priority;
|
int priority;
|
||||||
|
|
||||||
|
static ZipFile()
|
||||||
|
{
|
||||||
|
ZipConstants.DefaultCodePage = Encoding.Default.CodePage;
|
||||||
|
}
|
||||||
|
|
||||||
public ZipFile(string filename, int priority)
|
public ZipFile(string filename, int priority)
|
||||||
{
|
{
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
|
|||||||
Reference in New Issue
Block a user