Versions in this module Expand all Collapse all v1 v1.0.0 Feb 19, 2022 Changes in this version + var Boms = []struct{ ... } + var ReadBufSize int = 1024 + func CodepageAsString(codepage IDCodePage) string + func DecodeUTF16be(s string) string + func DecodeUTF16le(s string) string + func FileConvertCodepage(fileName string, fromCP, toCP IDCodePage) error + func IsSeparator(r rune) bool + func NewReader(r io.Reader, cpn ...string) (io.Reader, error) + func NewReaderTo(r io.Reader, cpn string) (io.Reader, error) + func StrConvertCodepage(s string, fromCP, toCP IDCodePage) (string, error) + func SupportedEncoder(cpn string) bool + func ValidUTF8(data []byte) bool + type CodePage struct + Boms []byte + NumByte byte + func (o CodePage) FirstAlphabetPos(d []byte) int + func (o CodePage) MatchingRunes() string + func (o CodePage) String() string + type IDCodePage uint16 + const ASCII + const CP1251 + const CP866 + const ISOLatinCyrillic + const KOI8R + const UTF16BE + const UTF16LE + const UTF32 + const UTF32BE + const UTF32LE + const UTF7 + const UTF8 + const Unicode + const UnicodeASCII + const Windows1252 + func CheckBOM(buf []byte) (id IDCodePage, res bool) + func CodepageAutoDetect(b []byte) IDCodePage + func CodepageDetect(r io.Reader) (IDCodePage, error) + func FileCodepageDetect(fn string, stopStr ...string) (IDCodePage, error) + func (i IDCodePage) BomLen() int + func (i IDCodePage) DeleteBom(s string) (res string) + func (i IDCodePage) DeleteBomFromReader(r io.Reader) io.Reader + func (i IDCodePage) ReaderHasBom(r io.Reader) bool + func (i IDCodePage) String() string + func (i IDCodePage) StringHasBom(s string) bool + type MatchRes struct + func (m MatchRes) String() string + type TCodepagesDic map[IDCodePage]CodePage + func NewCodepageDic() TCodepagesDic + func (o TCodepagesDic) Match(data []byte) (result IDCodePage)