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

net/url: Parse doesn't work as expected #21007

Closed
songjiayang opened this issue Jul 14, 2017 · 0 comments
Closed

net/url: Parse doesn't work as expected #21007

songjiayang opened this issue Jul 14, 2017 · 0 comments

Comments

@songjiayang
Copy link

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

go version go1.7.3 darwin/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/sjy/workspace/qiniu/base/qiniu:/Users/sjy/workspace/qiniu/base/docs:/Users/sjy/workspace/qiniu/base/com:/Users/sjy/workspace/qiniu/base/biz:/Users/sjy/workspace/qiniu/base/portal:/Users/sjy/workspace/qiniu/base/cgo:/Users/sjy/workspace/qiniu/portal-v4/service:/Users/sjy/workspace/qiniu/portal-v4/hack/cs-docker"
GORACE=""
GOROOT="/Users/sjy/.gvm/gos/go1.7.3"
GOTOOLDIR="/Users/sjy/.gvm/gos/go1.7.3/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/zy/_b35y_m13_v_x5pzz_x6sl5w0000gp/T/go-build152809595=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

I use net/url Parse method to get uri query params, but it isn't expected.

Test code is:

package main

import (
	"fmt"
	"net/url"
)

func main() {
	u, _ := url.Parse("http://a.cn?key=「内部」EVM 销售群群二维码.html")
	fmt.Println(u.Query().Get("key"))
}

What did you expect to see?

「内部」EVM 销售群群二维码.html

What did you see instead?

「内部」EVM

@mikioh mikioh changed the title net/url Parse doesn't work as expected net/url: Parse doesn't work as expected Jul 21, 2017
@golang golang locked and limited conversation to collaborators Jul 21, 2018
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

2 participants