charset

package
v0.0.0-...-a101d14 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

charset

pinyin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromUtf8

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

FromUtf8 将UTF8编码内容转换成指定编码

func GetPinYinHeader

func GetPinYinHeader(chinese string, keepAscii bool) string

GetPinYinHeader 获取拼音首字母 chinese 汉字字符串 keepAscii ascii码是否保留

func ToUtf8

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

ToUtf8 将指定编码内容转成UTF8

Types

type EncodType

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

Jump to

Keyboard shortcuts

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