I'm using the System.IO.Compression.ZipFile
lib to unzip .zip files and I came across a major problem when trying to extract files that have accents in the name.
If I try to extract with UTF-8 encoding :
ZipFile.ExtractToDirectory(caminhoArquivoZip, "E:\localParaExtrair", Encoding.UTF8);
Files that have an accented name have the character instead of the accented letter.
If I pass another Encoding
( Unicode
, for example), an exception is thrown:
The specified input name encoding is not supported.
If you try with Encoding.Default
other strange character is in place of the accented letter.
Is this a library problem? Is there any way I can extract these files correctly?
I'm fully aware that you should not write file names with accents, but it's not me who creates the files.