utils

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2021 License: LGPL-2.1 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GBK ...
	GBK string = "GBK"
	// UTF8 ...
	UTF8 string = "UTF8"
	// UNKNOWN ...
	UNKNOWN string = "UNKNOWN"
)

Variables

This section is empty.

Functions

func GetStringEncoding

func GetStringEncoding(dataStr string) string

GetStringEncoding determine string encoding, UTF8 or GBK or UNKNOWN

func IsGBK

func IsGBK(data []byte) bool

IsGBK determine GBK encoding

func IsUTF8

func IsUTF8(data []byte) bool

IsUTF8 determine UTF8 encoding

func UTF82GBK

func UTF82GBK(src string) ([]byte, error)

UTF82GBK convert UTF8 to GBK

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL