README ¶ charconv 转换文本的字符编码格式 常用于网络爬虫,将 GBK 网页内容转换成 UTF-8 编码格式。 Expand ▾ Collapse ▴ Documentation ¶ Overview ¶ Package charconv 用于转换字符的编码格式,例如GBK->UTF8 Index ¶ type GBKConv func (c GBKConv) BytesToGBK(data []byte) []byte func (c GBKConv) BytesToUTF8(data []byte) []byte func (c GBKConv) StrToGBK(data string) string func (c GBKConv) StrToUTF8(data string) string func (c GBKConv) ToGBK(r io.Reader) io.Reader func (c GBKConv) ToUTF8(r io.Reader) io.Reader Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type GBKConv ¶ type GBKConv empty.T func (GBKConv) BytesToGBK ¶ func (c GBKConv) BytesToGBK(data []byte) []byte func (GBKConv) BytesToUTF8 ¶ func (c GBKConv) BytesToUTF8(data []byte) []byte func (GBKConv) StrToGBK ¶ func (c GBKConv) StrToGBK(data string) string func (GBKConv) StrToUTF8 ¶ func (c GBKConv) StrToUTF8(data string) string func (GBKConv) ToGBK ¶ func (c GBKConv) ToGBK(r io.Reader) io.Reader ToGBK 将字符编码由 UTF-8 转为 GBK func (GBKConv) ToUTF8 ¶ func (c GBKConv) ToUTF8(r io.Reader) io.Reader ToUTF8 将字符编码由 GBK 转为 UTF-8 Source Files ¶ View all Source files gbk.go Click to show internal directories. Click to hide internal directories.