去语言如何将ansi文本转换为utf8? [英] go language how to convert ansi text to utf8?
本文介绍了去语言如何将ansi文本转换为utf8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在golang中将ansi文本转换为utf8(去语言)?
我尝试将ansi字符串转换为utf8字符串。
解决方案
Go只有UTF-8字符串。你可以使用这里描述的转换从byte []将某些东西转换为UTF8字符串:
http://golang.org/doc/go_spec.html#Conversions
How to convert ansi text to utf8 in golang (go language)? I try to convert ansi string to utf8 string.
解决方案
Go only has UTF-8 strings. You can convert something to a UTF8 string using the conversion described here from a byte[]:
http://golang.org/doc/go_spec.html#Conversions
这篇关于去语言如何将ansi文本转换为utf8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文