charset

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

charset

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportCharset = errors.New("unsupport charset")
)

Functions

func FromUtf8

func FromUtf8(buf []byte, to Type) ([]byte, error)

FromUtf8 将UTF8编码格式转换成指定编码格式

func ToUtf8

func ToUtf8(buf []byte, from Type) ([]byte, error)

ToUtf8 将非UTF8格式转成UTF8格式

Types

type Type

type Type uint8
const (
	UTF8 Type
	GB2312
	GBK
	GB18030
	HZGB2312
)

Jump to

Keyboard shortcuts

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