add charsetreader to xmlreader

This commit is contained in:
Nazar Kanaev 2021-03-23 11:31:46 +00:00
parent 454eff0155
commit 646519e074
7 changed files with 19 additions and 6 deletions

View file

@ -19,7 +19,7 @@ func sniff(lookup string) (string, processor) {
lookup = strings.TrimSpace(lookup)
switch lookup[0] {
case '<':
decoder := xml.NewDecoder(strings.NewReader(lookup))
decoder := xmlDecoder(strings.NewReader(lookup))
for {
token, _ := decoder.Token()
if token == nil {