我使用下面的代碼生成字符串 str 的 XML 編碼:str := string([]byte{0x01})marshalBytes, _ := xml.Marshal(str)fmt.Println(string(marshalBytes)) // output: <string>?</string>; ? is [239 191 189] in bytes.顯然, 不等同于 0x01。我該如何解決?
Go xml.Marshal 返回?zé)o效字符
開(kāi)心每一天1111
2021-08-23 16:34:27