gbk

package
v0.0.0-...-a11b62f Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package gbk GBK转码包 Writer : Huang Tao 2020/03/01 支持将 GBK 编码的二进制解码为字符串,或将字符串使用 GBK 编码成二进制

Index

Constants

This section is empty.

Variables

View Source
var (
	// Encoder GBK 编码器
	Encoder *encoding.Encoder
	// Decoder GBK 解码器
	Decoder *encoding.Decoder
)

Functions

func Decode

func Decode(b []byte) (string, error)

Decode 将 GBK 编码的 bytes 转换成 UTF8 字符串

func Encode

func Encode(s string) ([]byte, error)

Encode 将 UTF8 字符串转换成 GBK 编码的 bytes

func NewReader

func NewReader(r io.Reader) *transform.Reader

NewReader 新建一个 GBK 编码的 Reader

func NewWriter

func NewWriter(w io.Writer) *transform.Writer

NewWriter 新建一个 GBK 编码的 Writer

Types

This section is empty.

Jump to

Keyboard shortcuts

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