Documentation ¶
Index ¶
- func AnsiToUTF8(stream []byte) ([]byte, error)
- func BomUTF8ToAnsi(stream []byte) ([]byte, error)
- func BomUTF8ToUTF8(stream []byte) ([]byte, error)
- func ToAnsi(stream []byte, encoding string) ([]byte, error)
- func ToUTF8(stream []byte, encoding string) ([]byte, error)
- func UTF16BEToAnsi(stream []byte) ([]byte, error)
- func UTF16BEToUTF8(stream []byte) ([]byte, error)
- func UTF16LEToAnsi(stream []byte) ([]byte, error)
- func UTF16LEToUTF8(stream []byte) ([]byte, error)
- func UTF8ToAnsi(stream []byte) ([]byte, error)
- type UnsupportedEncoding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnsiToUTF8 ¶
AnsiToUTF8 transforms encoding from Ansi to UTF8.
func BomUTF8ToAnsi ¶
BomUTF8ToAnsi transforms stream encoding from BomUTF8 to Ansi.
func BomUTF8ToUTF8 ¶
BomUTF8ToUTF8 cut first three bytes BOM prefix of the stream.
func ToAnsi ¶
ToAnsi dispatches to different handler according to the encoding. If the encoding has been Ansi, it returns directly. If the encoding is out of ANSI, UTF8, BOM UTF8, UTF16 BE/LE, it returns Unexpected Error.
func ToUTF8 ¶
ToUTF8 dispatches to different handler according to the encoding. If the encoding has been UTF8, it returns directly. If the encoding is out of ANSI, UTF8, BOM UTF8, UTF16 BE/LE, it returns Unexpected Error.
func UTF16BEToAnsi ¶
UTF16BEToAnsi transforms stream encoding from UTF16BE to Ansi.
func UTF16BEToUTF8 ¶
UTF16BEToUTF8 transforms encoding from UTF16 BE to UTF8.
func UTF16LEToAnsi ¶
UTF16LEToAnsi transforms stream encoding from UTF16LE to Ansi.
func UTF16LEToUTF8 ¶
UTF16LEToUTF8 transforms encoding from UTF16 LE to UTF8.
func UTF8ToAnsi ¶
UTF8ToAnsi transforms stream encoding from UTF8 to Ansi.
Types ¶
type UnsupportedEncoding ¶
type UnsupportedEncoding string
func (UnsupportedEncoding) Error ¶
func (e UnsupportedEncoding) Error() string