When creating a zip file out of many Arabic named files, I have as prompted in DotNetZip's FAQ changed the code page to the following:
Using zip As New ZipFile() zip.AddDirectoryByName("Files") zip.AlternateEncoding = Encoding.UTF8 zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always Dim row As Integer For row = 0 To ds.Tables("d").Rows.Count - 1 fileToDownload = Server.MapPath("~/.../Resources/Attachments/" + ds.Tables("d").Rows(row).Item(1).ToString) zip.AddFile(fileToDownload, "Files") Next Response.Clear() Response.BufferOutput = False Dim zipName As String = [String].Format(gvRow.Cells(8).Text.Trim + ".zip") Response.ContentType = "application/zip" Response.AddHeader("content-disposition", "attachment; filename=" + zipName) zip.Save(Response.OutputStream) Response.[End]() End Using
I have used several listed Arabic encoding codes, but most of them produce '???' whereas this one produces names as the following: '¦ßs-¦ µ+++ ¦ß+pß.docx'
What is the correct code to be used? Or am I missing something?