6
I’m using the lib System.IO.Compression.ZipFile
to unzip files .zip and came across a big problem while trying to extract files that have accents in the name.
If I try to extract with encoding UTF-8:
ZipFile.ExtractToDirectory(caminhoArquivoZip, "E:\\localParaExtrair", Encoding.UTF8);
Files that have accented names get the character instead of the accented letter.
If I pass another Encoding
(Unicode
, for example), a Exception:
No support for specified input name encoding.
If you try with Encoding.Default
another strange character is in place of the accented letter.
Is this a library problem? Is there any way to get these files out properly?
I am fully aware that one should not write file names with accents, but I am not the one who creates the files.
Caraca, very good. You can complement the answer by explaining why the parameter 850 in the
.GetEncoding()
?– Jéf Bueno
Thanks for the @Jéfersonbueno complementation
– Arthur Menezes
with me did not work, and appeared error: System.Notsupportedexception: No data is available for encoding 850
– Bruno Henri
with me did not work, and appeared error: System.Notsupportedexception: No data is available for encoding 850
– Bruno Henri