golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.35k stars 17.71k forks source link

archive/zip: FileHeader struct lacks Unicode Path Extra Field (0x7075) #36760

Open iamnp opened 4 years ago

iamnp commented 4 years ago

What version of Go are you using (go version)?

$ go version go1.13.6 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\npanin\AppData\Local\go-build
set GOENV=C:\Users\npanin\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\GoProjects
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\npanin\AppData\Local\Temp\go-build726899154=/tmp/go-build -gno-record-gcc-switches

What did you do?

Tried to read ZIP file with unicode filename using archive/zip package

What did you expect to see?

FileHeader struct field to store Unicode Path Extra Field as described in 4.6.9 of https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

What did you see instead?

No way to retrieve Unicode Path Extra Field except for manually parsing it from FileHeader.Extra field

FedorArbuzov commented 4 years ago

Have the same problem!!!