gcharset

package
v1.12.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: MIT Imports: 6 Imported by: 15

Documentation

Overview

Package charset implements character-set conversion functionality.

Supported Character Set:

Chinese : GBK/GB18030/GB2312/Big5

Japanese: EUCJP/ISO2022JP/ShiftJIS

Korean : EUCKR

Unicode : UTF-8/UTF-16/UTF-16BE/UTF-16LE

Other : macintosh/IBM*/Windows*/ISO-*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(dstCharset string, srcCharset string, src string) (dst string, err error)

Convert converts <src> charset encoding from <srcCharset> to <dstCharset>, and returns the converted string. It returns <src> as <dst> if it fails converting.

func Supported

func Supported(charset string) bool

Supported returns whether charset <charset> is supported.

func ToUTF8

func ToUTF8(srcCharset string, src string) (dst string, err error)

ToUTF8 converts <src> charset encoding from <srcCharset> to UTF-8 , and returns the converted string.

func UTF8To

func UTF8To(dstCharset string, src string) (dst string, err error)

UTF8To converts <src> charset encoding from UTF-8 to <dstCharset>, and returns the converted string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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