feed-to-muc/vendor/github.com/mmcdole/gofeed/internal/shared/charsetconv.go

20 lines
348 B
Go
Raw Normal View History

2019-02-20 20:23:48 +01:00
package shared
import (
"io"
"golang.org/x/net/html/charset"
)
func NewReaderLabel(label string, input io.Reader) (io.Reader, error) {
conv, err := charset.NewReaderLabel(label, input)
if err != nil {
return nil, err
}
// Wrap the charset decoder reader with a XML sanitizer
//clean := NewXMLSanitizerReader(conv)
return conv, nil
}