remove bom
This commit is contained in:
parent
42b36965c5
commit
fbb0dfed47
3 changed files with 17 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ type processor func(r io.Reader) (*Feed, error)
|
|||
|
||||
func sniff(lookup string) (string, processor) {
|
||||
lookup = strings.TrimSpace(lookup)
|
||||
lookup = strings.TrimLeft(lookup, "\x00\xEF\xBB\xBF\xFE\xFF")
|
||||
switch lookup[0] {
|
||||
case '<':
|
||||
decoder := xmlDecoder(strings.NewReader(lookup))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue