go UTF-8 to gbk 编码转换

180it 2020-10-26 PM 1950℃ 0条

example

package main
import "fmt"
import "github.com/axgle/mahonia"
func main(){
  enc:=mahonia.NewEncoder("gbk")
  //converts a  string from UTF-8 to gbk encoding.
  fmt.Println(enc.ConvertString("hello,世界"))  
}
支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

go UTF-8 to gbk 编码转换