/**
* gbk转utf8
*/
func coverGBKToUTF8(src string) string {
return mahonia.NewDecoder("gbk").ConvertString(src)
}
/**
* 替换乱码
*/
func replaceNullHtml(src string) string {
temp := strings.Replace(src, "聽", "", -1)
return temp
}
/**
* gbk转utf8
*/
func coverString(src string) string {
return replaceNullHtml(coverGBKToUTF8(src))
}
12-31
06-25
1283
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-06
2125
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)