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
The type assertion in htmlindex.Name(enc) to check if enc is a golang.org/x/text/encoding/internal/identifier.Interfacewill always fail in the above code because here enc is a golang.org/x/net/html/charset.htmlEncoding which wraps the actual encoding (except its eventual internal part).
The text was updated successfully, but these errors were encountered:
rakyll
changed the title
golang.org/x/net/html/charset.htmlEncoding incompatibility with golang.org/x/text/encoding/htmlindex.Name
x/net/html/charset: htmlEncoding incompatibility with x/text/encoding/htmlindex.Name
Feb 6, 2017
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Run :
What did you expect to see?
What did you see instead?
The type assertion in
htmlindex.Name(enc)
to check ifenc
is agolang.org/x/text/encoding/internal/identifier.Interface
will always fail in the above code because hereenc
is agolang.org/x/net/html/charset.htmlEncoding
which wraps the actual encoding (except its eventual internal part).The text was updated successfully, but these errors were encountered: