encoding

package
v0.1.35 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const GB2312 = "gb2312"

GB2312 gb2312

View Source
const GBK = "gbk"

GBK gbk

View Source
const UTF8 = "utf-8"

UTF8 utf-8

Variables

This section is empty.

Functions

func Decode

func Decode(content string, e string) (result []byte, err error)

Decode 根据编码进行解码操作

func DecodeBytes

func DecodeBytes(buff []byte, e string) (result []byte, err error)

DecodeBytes 根据编码进行解码操作

func Encode

func Encode(content string, e string) (result []byte, err error)

Encode 将UTF8字符串编码为gbk或gb2312格式

func EncodeBytes

func EncodeBytes(buff []byte, e string) (result []byte, err error)

EncodeBytes 将UTF8字符串编码为gbk或gb2312格式

func GetDecodeReader

func GetDecodeReader(buff []byte, charset string) io.Reader

GetDecodeReader 获取 charset不区分大小写

func GetEncodeReader

func GetEncodeReader(buff []byte, charset string) io.Reader

GetEncodeReader 获取

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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