go通过第三方库 mahonia gbk 转utf8

go get github.com/axgle/mahonia
 

dec := mahonia.NewDecoder("GBK")
ret:=dec.ConvertString(resp)
fmt.Println("GBK to UTF-8: ", String)
原文地址:https://www.cnblogs.com/zhaoyun4122/p/9241262.html