答案是:在 Go 程序中,可以使用 golang.org/x/text/encoding/simplifiedchinese 包来将汉字转换为适当的编码格式,以避免在发送给客户端时显示乱码。
golang.org/x/text/encoding/simplifiedchinese