Documentation ¶
Index ¶
- Constants
- func Convert(dst []byte, dstCharset Charset, src []byte, srcCharset Charset) ([]byte, error)
- func ConvertFromBinary(dst []byte, dstCharset Charset, src []byte) ([]byte, error)
- func ConvertFromUTF8(dst []byte, dstCharset Charset, src []byte) ([]byte, error)
- func IsBackslashSafe(charset Charset) bool
- func IsMultibyteByName(csname string) bool
- func IsUnicode(charset Charset) bool
- func IsUnicodeByName(csname string) bool
- func Slice(charset Charset, input []byte, from, to int) []byte
- func Validate(charset Charset, input []byte) bool
- type Charset
- type Charset_8bit
- type Charset_binary
- type Charset_cp932
- type Charset_eucjpms
- type Charset_euckr
- type Charset_gb18030
- type Charset_gb2312
- type Charset_latin1
- type Charset_sjis
- type Charset_ucs2
- type Charset_ujis
- type Charset_utf16
- type Charset_utf16le
- type Charset_utf32
- type Charset_utf8mb3
- type Charset_utf8mb4
- type Convertible
- type UnicodeMapping
Constants ¶
View Source
const RuneError = utf8.RuneError
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert transforms `src`, encoded with Charset `srcCharset`, and changes its encoding so that it becomes encoded with `dstCharset`. The result is appended to `dst` if `dst` is not nil; otherwise a new byte slice will be allocated to store the result.
func ConvertFromBinary ¶ added in v0.14.0
func ConvertFromUTF8 ¶
func IsBackslashSafe ¶
func IsMultibyteByName ¶
func IsUnicodeByName ¶
Types ¶
type Charset_8bit ¶
type Charset_8bit = eightbit.Charset_8bit
type Charset_binary ¶
type Charset_binary = eightbit.Charset_binary
type Charset_cp932 ¶
type Charset_cp932 = japanese.Charset_cp932
type Charset_eucjpms ¶
type Charset_eucjpms = japanese.Charset_eucjpms
type Charset_euckr ¶
type Charset_euckr = korean.Charset_euckr
type Charset_gb18030 ¶
type Charset_gb18030 = simplifiedchinese.Charset_gb18030
type Charset_gb2312 ¶
type Charset_gb2312 = simplifiedchinese.Charset_gb2312
type Charset_latin1 ¶
type Charset_latin1 = eightbit.Charset_latin1
type Charset_sjis ¶
type Charset_sjis = japanese.Charset_sjis
type Charset_ucs2 ¶
type Charset_ucs2 = unicode.Charset_ucs2
type Charset_ujis ¶
type Charset_ujis = japanese.Charset_ujis
type Charset_utf16 ¶
type Charset_utf16 = unicode.Charset_utf16be
type Charset_utf16le ¶
type Charset_utf16le = unicode.Charset_utf16le
type Charset_utf32 ¶
type Charset_utf32 = unicode.Charset_utf32
type Charset_utf8mb3 ¶ added in v0.14.0
type Charset_utf8mb3 = unicode.Charset_utf8mb3
type Charset_utf8mb4 ¶
type Charset_utf8mb4 = unicode.Charset_utf8mb4
type Convertible ¶
type UnicodeMapping ¶
type UnicodeMapping = eightbit.UnicodeMapping
Directories ¶
Path | Synopsis |
---|---|
Package korean provides Korean encodings such as EUC-KR.
|
Package korean provides Korean encodings such as EUC-KR. |
Package simplifiedchinese provides Simplified Chinese encodings such as GBK.
|
Package simplifiedchinese provides Simplified Chinese encodings such as GBK. |
Click to show internal directories.
Click to hide internal directories.