Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ZipEntry does not support special characters by default since 1.1.0

Aperta
#591 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Inizia da ZipEntry.cs e riproduci il problema con ZipOutputStream e la voce "Téb.csv" mostrata nel report. Traccia il comportamento predefinito di UseUnicode e AutomaticCodePage, quindi verifica che l'archivio risultante conservi il nome del file accentato senza workaround per ogni voce.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Steps to reproduce

Try to use the following code to zip a csv file with a special character ("é") in its name:

using (var zos = new ZipOutputStream(File.Create(zipPath)))
{
    ...
    zos.PutNextEntry(new ZipEntry("Téb.csv"));
    ...
}

The default value of UseUnicode changed to false since 1.1.0 when the AutomaticCodePage property was introduced in ZipEntry.cs.
Now by default codePage is -1, so UseUnicode will get a false value (as its getter uses the codePage field instead of the CodePage property).
There are workarounds (setting UseUnicode by hand or filling the IsUnicodeText property for every ZipEntry), I just wanted to let you know this issue.

Expected behavior

The zip should contain a "Téb.csv" entry.

Actual behavior

The zip contains a "TTb.csv"

Version of SharpZipLib

1.3.0

Obtained from (only keep the relevant lines)
  • Package installed using NuGet
Lingua principale
C#
Stelle
3.9k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di icsharpcode/SharpZipLib

Tutte le issue di icsharpcode/SharpZipLib

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.