Creating a zipfile with nonASCII characters in zipped files fail to encode if Modified is not set. The behavior could be ok still but currently, it anyway checks that if utf-8 mode is needed which makes the programmer to think it should work without any tricks.
so:
w := zip.NewWriter(os.Stdout)
f, err := w.Create("asdää123ääääääend")
… write to f …
The text was updated successfully, but these errors were encountered:
Bysmyyr
changed the title
Zip fails utf encode filenames with utf-8 chars if 'Modified' is not set
Zip fails utf-8 encode filenames with utf-8 chars if 'Modified' is not set
Feb 9, 2021
Bysmyyr
changed the title
Zip fails utf-8 encode filenames with utf-8 chars if 'Modified' is not set
Zip fails encode filenames with utf-8 chars if 'Modified' is not set
Feb 9, 2021
dmitshur
changed the title
Zip fails encode filenames with utf-8 chars if 'Modified' is not set
archive/zip: fails to encode filenames with utf-8 chars if 'Modified' is not set
Feb 9, 2021
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
that's almost latests
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Creating a zipfile with nonASCII characters in zipped files fail to encode if Modified is not set. The behavior could be ok still but currently, it anyway checks that if utf-8 mode is needed which makes the programmer to think it should work without any tricks.
so:
…doesn't work, but:
works
Problem confirmed here:
https://gophers.slack.com/archives/C029RQSEE/p1612881140479100?thread_ts=1612878897.474000&cid=C029RQSEE
What did you expect to see?
asdää123ääääääend
What did you see instead?
asd├д├д123├д├д├д├д├д├дend
The text was updated successfully, but these errors were encountered: