Using DotNetZip Library unzip file with non ASCII characters
Posted
by
Morten Lyhr
on Stack Overflow
See other posts from Stack Overflow
or by Morten Lyhr
Published on 2011-01-11T06:33:03Z
Indexed on
2011/01/11
6:53 UTC
Read the original article
Hit count: 438
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?
© Stack Overflow or respective owner