]> Cypherpunks repositories - gostls13.git/commit
archive/zip: set utf-8 flag
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Wed, 5 Apr 2017 08:32:09 +0000 (17:32 +0900)
committerJoe Tsai <thebrokentoaster@gmail.com>
Fri, 26 May 2017 17:08:18 +0000 (17:08 +0000)
commit0a3f3e166d702f477863a5260779fa0357c72302
treedbc0831b89f6a9441add14938bbf49146aef1492
parenta8dd20d389a1364059c36202da6a2a655677f7d8
archive/zip: set utf-8 flag

See: https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.0.TXT

Document says:
> If general purpose bit 11 is set, the filename and comment must support The
> Unicode Standard, Version 4.1.0 or greater using the character encoding form
> defined by the UTF-8 storage specification.

Since Go encode the filename to UTF-8, general purpose bit 11 should be set.

Change-Id: Ica4af02b4dc695e9a5c015ae360e70171efb6ee3
Reviewed-on: https://go-review.googlesource.com/39570
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/archive/zip/writer.go
src/archive/zip/writer_test.go