codec

package
v0.0.0-...-04eba25 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GBKStringToUTF8

func GBKStringToUTF8(gbkString string) (string, error)

GBKStringToUTF8 converts GBK encoded string gbkString to UTF-8 string.

func GBKToUTF8

func GBKToUTF8(gbkBytes []byte) ([]byte, error)

GBKToUTF8 converts GBK encoded byte slice gbkBytes to UTF-8 byte slice.

func HaveUTF8BOMHead

func HaveUTF8BOMHead(data []byte) bool

HaveUTF8BOMHead checks whether data starts with UTF-8-BOM header.

func IsUTF8

func IsUTF8(data []byte) bool

IsUTF8 Checks whether data in utf8 format.

func IsUTF8BOM

func IsUTF8BOM(data []byte) bool

IsUTF8BOM checks where data encoded in UTF-8-BOM.

func UTF8StringToGBK

func UTF8StringToGBK(utf8String string) (string, error)

UTF8StringToGBK converts UTF-8 encoded string utf8String to GBK string.

func UTF8ToGBK

func UTF8ToGBK(utfBytes []byte) ([]byte, error)

UTF8ToGBK converts UTF-8 encoded byte slice utfBytes to GBK byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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