Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Convert 转换字符串的编码(字符集的编码) /* 支持的字符集(charset): UTF-8、GBK、Big5、ISO-* 等,更多详见: https://goframe.org/pages/viewpage.action?pageId=1114178. */ Convert func(dstCharset string, srcCharset string, src string) (dst string, err error) = gcharset.Convert ToUTF8 func(srcCharset string, src string) (dst string, err error) = gcharset.ToUTF8 UTF8To func(dstCharset string, src string) (dst string, err error) = gcharset.UTF8To )
View Source
var DetermineEncoding func(content []byte, contentType string) (e encoding.Encoding, name string, certain bool) = charset.DetermineEncoding
DetermineEncoding 编码推断.
Deprecated: 不一定准(检测GBK文本有问题,推断出来的是 "windows-1252").
View Source
var IsSupported func(charset string) bool = gcharset.Supported
IsSupported 是否支持 指定字符集 ?
View Source
var IsUTF8 func(data []byte) bool = utf8.Valid
View Source
var IsUTF8String func(s string) bool = utf8.ValidString
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.