{"modulePath":"github.com/RedAFD/code-core","version":"v1.14.0-rc8","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package charset\n\n## Variables\n\n```go\nvar UTF8BOM = []byte{'\\xef', '\\xbb', '\\xbf'}\n```\nUTF8BOM is the utf-8 byte-order marker\n\n## Functions\n\n```go\nfunc DetectEncoding(content []byte) (string, error)\n```\nDetectEncoding detect the encoding of content\n\n```go\nfunc RemoveBOMIfPresent(content []byte) []byte\n```\nRemoveBOMIfPresent removes a UTF-8 BOM from a \\[]byte\n\n```go\nfunc ToUTF8(content string) string\n```\nToUTF8 converts content to UTF8 encoding and ignore error\n\n```go\nfunc ToUTF8DropErrors(content []byte) []byte\n```\nToUTF8DropErrors makes sure the return string is valid utf-8; attempts conversion if possible\n\n```go\nfunc ToUTF8WithErr(content []byte) (string, error)\n```\nToUTF8WithErr converts content to UTF8 encoding\n\n```go\nfunc ToUTF8WithFallback(content []byte) []byte\n```\nToUTF8WithFallback detects the encoding of content and coverts to UTF-8 if possible\n\n","path":"github.com/RedAFD/code-core/modules/charset","name":"charset","synopsis":"","isRedistributable":true}
