encoding

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UTF8        = "UTF-8"
	UTF16       = "UTF-16"
	UTF16LE     = "UTF-16LE"
	UTF16BE     = "UTF-16BE"
	GBK         = "gbk"
	GB2312      = "GB2312"
	BIG5        = "Big5"
	GB18030     = "gb18030"
	EUCJP       = "EUC-JP"
	ISO2022JP   = "ISO-2022-JP"
	SHIFTJIS    = "Shift_JIS"
	EUCKR       = "EUC-KR"
	ISO8859_2   = "ISO-8859-2"
	ISO8859_3   = "ISO-8859-3"
	ISO8859_4   = "ISO-8859-4"
	ISO8859_5   = "ISO-8859-5"
	ISO8859_7   = "ISO-8859-7"
	ISO8859_9   = "ISO-8859-9"
	ISO8859_10  = "ISO-8859-10"
	ISO8859_13  = "ISO-8859-13"
	ISO8859_14  = "ISO-8859-14"
	ISO8859_15  = "ISO-8859-15"
	ISO8859_16  = "ISO-8859-16"
	WINDOWS1250 = "windows-1250"
	WINDOWS1251 = "windows-1251"
	WINDOWS1252 = "windows-1252"
	WINDOWS1253 = "windows-1253"
	WINDOWS1254 = "windows-1254"
	WINDOWS1255 = "windows-1255"
	WINDOWS1256 = "windows-1256"
	WINDOWS1257 = "windows-1257"
	WINDOWS1258 = "windows-1258"
	WINDOWS874  = "windows-874"
	MACINTOSH   = "macintosh"
	KOI8R       = "KOI8-R"
	KOI8U       = "KOI8-U"
)

Variables

This section is empty.

Functions

func Convert

func Convert(src string, srcCharset string, dstCharset string) (string, error)

func StringToUTF8

func StringToUTF8(src string, srcCharset string) (string, error)

func Supported

func Supported(charset string) bool

Supported 判断指定的编码是否被支持

func UTF8ToString

func UTF8ToString(src string, dstCharset string) (string, error)

func UrlDecoding

func UrlDecoding(str string, charset string) (string, error)

func UrlEncoding

func UrlEncoding(str string, charset string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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