You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This replaces the global static ZipStrings singleton with instances of StringCodec, which will:
- Remove encoding configuration from a shared global state
- Allow for different defaults for input and output
- Explicitly override the encodings used for ZipCrypto and zip archive comments (the one in the Central Directory, not the individual entry comments).
- Use "Unicode" for new entries (unless overriden)
- Make it much more clear (hopefully) how and why different encodings are used.
Copy file name to clipboardexpand all lines: src/ICSharpCode.SharpZipLib/Zip/FastZip.cs
+29-1
Original file line number
Diff line number
Diff line change
@@ -345,6 +345,29 @@ public Deflater.CompressionLevel CompressionLevel
345
345
set{compressionLevel_=value;}
346
346
}
347
347
348
+
/// <summary>
349
+
/// Reflects the opposite of the internal <see cref="StringCodec.ForceZipLegacyEncoding"/>, setting it to <c>false</c> overrides the encoding used for reading and writing zip entries
350
+
/// </summary>
351
+
publicboolUseUnicode
352
+
{
353
+
get=>!_stringCodec.ForceZipLegacyEncoding;
354
+
set=>_stringCodec.ForceZipLegacyEncoding=!value;
355
+
}
356
+
357
+
/// <summary> Gets or sets the code page used for reading/writing zip file entries when unicode is disabled </summary>
0 commit comments