diff --git a/Core/Net/NetFileCache.cs b/Core/Net/NetFileCache.cs
index 3c91a02211..6aec3f94cd 100644
--- a/Core/Net/NetFileCache.cs
+++ b/Core/Net/NetFileCache.cs
@@ -35,6 +35,13 @@ public class NetFileCache : IDisposable
private static readonly Regex cacheFileRegex = new Regex("^[0-9A-F]{8}-", RegexOptions.Compiled);
private static readonly ILog log = LogManager.GetLogger(typeof (NetFileCache));
+ static NetFileCache()
+ {
+ // SharpZibLib 1.1.0 changed this to default to false, but we depend on it for international mods.
+ // https://github.com/icsharpcode/SharpZipLib/issues/591
+ ZipStrings.UseUnicode = true;
+ }
+
///
/// Initialize a cache given a GameInstanceManager
///
diff --git a/Tests/Core/Cache.cs b/Tests/Core/Cache.cs
index d93a8a06ea..aa1fb556c1 100644
--- a/Tests/Core/Cache.cs
+++ b/Tests/Core/Cache.cs
@@ -31,7 +31,7 @@ public void RemoveCache()
cache.Dispose();
cache = null;
module_cache.Dispose();
- module_cache = null;
+ module_cache = null;
Directory.Delete(cache_dir, true);
}
@@ -206,6 +206,17 @@ public void ZipValid_ContainsFilenameWithBadChars_NoException()
Thread.CurrentThread.CurrentUICulture = origUICulture;
}
+ [Test]
+ public void ZipValid_ContainsFilenameWithUnicodeChars_Valid()
+ {
+ bool valid = false;
+ string reason = null;
+
+ Assert.DoesNotThrow(() =>
+ valid = NetFileCache.ZipValid(TestData.ZipWithUnicodeChars, out reason));
+ Assert.IsTrue(valid, reason);
+ }
+
[Test]
public void EnforceSizeLimit_UnderLimit_FileRetained()
{
diff --git a/Tests/Data/TestData.cs b/Tests/Data/TestData.cs
index 88447d8339..d15615d219 100644
--- a/Tests/Data/TestData.cs
+++ b/Tests/Data/TestData.cs
@@ -124,6 +124,11 @@ public static string DogeCoinFlag_101_LZMA()
///
public static readonly string ZipWithBadChars = DataDir("ZipWithBadChars.zip");
+ ///
+ /// Contains files with names that differ in their Unicode and "original" representation.
+ ///
+ public static readonly string ZipWithUnicodeChars = DataDir("ZipWithUnicodeChars.zip");
+
///
/// DogeCoinFlag 1.01 info. This contains a bug where the
/// install stanza doesn't actually refer to any files.
diff --git a/Tests/Data/ZipWithUnicodeChars.zip b/Tests/Data/ZipWithUnicodeChars.zip
new file mode 100644
index 0000000000..d5abf6ef88
Binary files /dev/null and b/Tests/Data/ZipWithUnicodeChars.zip differ
diff --git a/Tests/GUI/GH1866.cs b/Tests/GUI/GH1866.cs
index 8c5178f29f..91e077a615 100644
--- a/Tests/GUI/GH1866.cs
+++ b/Tests/GUI/GH1866.cs
@@ -15,6 +15,7 @@ namespace Tests.GUI
/// which involves sorting the GUI table by Max KSP Version and then performing a repo operation.
///
[TestFixture]
+ [NUnit.Framework.Category("Display")]
public class GH1866
{
private CkanModule _anyVersionModule;