func GbkToUtf8(s []byte) ([]byte,error) { reader := transform.NewReader(bytes.NewReader(s),simplifiedchinese.GBK.NewDecoder()) d,e := IoUtil.ReadAll(reader) if e != nil { return nil,e } return d,nil } func Utf8ToGbk(s []byte) ([]byte,simplifiedchinese.GBK.NewEncoder()) d,nil }