You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. go get -v kamilkisiel.net/go/bugascii
What is the expected output?
$ go get -v kamilkisiel.net/go/bugutf8
Fetching https://kamilkisiel.net/go/bugutf8?go-get=1
https fetch failed.
Fetching http://kamilkisiel.net/go/bugutf8?go-get=1
Parsing meta tags from http://kamilkisiel.net/go/bugutf8?go-get=1 (status code 200)
get "kamilkisiel.net/go/bugutf8": found meta tag
main.metaImport{Prefix:"kamilkisiel.net/go/bugutf8", VCS:"git",
RepoRoot:"https://github.com/kisielk/gotool";} at
http://kamilkisiel.net/go/bugutf8?go-get=1
kamilkisiel.net/go/bugutf8 (download)
kamilkisiel.net/go/bugutf8
What do you see instead?
$ go get -v kamilkisiel.net/go/bugascii
Fetching https://kamilkisiel.net/go/bugascii?go-get=1
https fetch failed.
Fetching http://kamilkisiel.net/go/bugascii?go-get=1
Parsing meta tags from http://kamilkisiel.net/go/bugascii?go-get=1 (status code 200)
import "kamilkisiel.net/go/bugascii": parse
http://kamilkisiel.net/go/bugascii?go-get=1: no go-import meta tags
package kamilkisiel.net/go/bugascii: unrecognized import path
"kamilkisiel.net/go/bugascii"
Which version are you using? (run 'go version')
go 1.1
Please provide any additional information below.
The only difference between the two paths is the encoding at the top of the file.
bugascii has:
<?xml version="1.0" encoding="ascii"?>
bugutf8 has:
<?xml version="1.0" encoding="utf-8"?>
After instrumenting the go tool's discovery.go and found the error is coming from the
XML decoder:
"error: xml: encoding "ascii" declared but Decoder.CharsetReader is
nil"
Unfortunately this kind of error is not reported anywhere by the Go tool and I spent
quite a while chasing it down. Either the tool should handle encodings other than utf-8
or else report the error in a way that doesn't imply the user did something wrong with
placing the meta tag on their page.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: