Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: import path "demo/测试" is reported as malformed #57503

Closed
sxin0 opened this issue Dec 29, 2022 · 1 comment
Closed

cmd/go: import path "demo/测试" is reported as malformed #57503

sxin0 opened this issue Dec 29, 2022 · 1 comment

Comments

@sxin0
Copy link

sxin0 commented Dec 29, 2022

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

$ go version
go version go1.19.2 linux/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jsx/.cache/go-build"
GOENV="/home/jsx/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/jsx/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jsx/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/data/www/jsx/tanxiao_hesuan/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build45875529=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Use Chinese as the directory

What did you expect to see?

All utf8 characters are supported

// demo/测试/示例.go
package 测试

func A测试() string {
	return "示例"
}
// main.go

fmt.Println(测试.A测试())

// main.go:9:2: malformed import path "demo/测试": invalid char '测'

What did you see instead?

main.go:9:2: malformed import path "demo/测试": invalid char '测'

@sxin0 sxin0 changed the title app/jobs/console/test/test.go:9:2: malformed import path "tanxiao_hesuan/demo/测试": invalid char '测' main.go:9:2: malformed import path "demo/测试": invalid char '测' Dec 29, 2022
@dmitshur dmitshur changed the title main.go:9:2: malformed import path "demo/测试": invalid char '测' cmd/go: import path "demo/测试" is reported as malformed Dec 29, 2022
@dmitshur
Copy link
Contributor

Thanks for the report. Also see a similar previous report in #45507.

I think the tracking issue for revisiting this is #45549 (and maybe also #44970). Please comment if you think this is a different issue.

CC @bcmills, @matloob.

@dmitshur dmitshur closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2022
@golang golang locked and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants