I’m trying to unzip a file, using DotNetZip Library.
The file contains folders and files with danish characters (æøåÆØÅ).
TotalCommander, 7Zip, Windows own zip all extract the files correctly, but DotNetZip Library mangles the danish characters.
Ex: File_æøåÆØÅ.txt becomes File_æ¢åÆ¥Å.txt
insted of aø it contains a ¢.
insted of a Ø it contains a ¥.
Code:
using (var zipFile = ZipFile.Read(@"File_æøåÆØÅ.zip"))
{
zipFile.ExtractAll(@"File_æøåÆØÅ",
ExtractExistingFileAction.OverwriteSilently);
}
I’m using the default encoding(“da-DK” culture), I have tried other encodings like UTF8 etc.
How can I unzip a file containing filenames with Danish characters?
This sounds simply like a bug in “DotNetZip” – have you tried SharpZipLib or ZipPackage (in the BCL)? Encoding typically relates to the file contents, not the name; so this shouldn’t be a factor.
You should report this (with an example) to the author.