Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"encoding/xml"
"fmt"
"io"

"golang.org/x/net/html/charset"
)

// ConvertXML converts an XML file to text.
Expand All @@ -27,6 +29,7 @@ func XMLToText(r io.Reader, breaks []string, skip []string, strict bool) (string

dec := xml.NewDecoder(r)
dec.Strict = strict
dec.CharsetReader = charset.NewReaderLabel
for {
t, err := dec.Token()
if err != nil {
Expand Down