miniflux-v2/http/client
Peter De Wachter 15505ee4a2 Make UTF-8 the default encoding for XML feeds
Consider the feed http://planet.haskell.org/atom.xml
- This is a UTF-8 encoded XML file
- No encoding declaration in the XML header
- No Unicode byte order mark
- Served with HTTP Content-Type "text/xml" (no charset parameter)

Miniflux lets charset.NewReader handle this. The charset package
implements the HTML5 character encoding algorithm, which, in this
situation, defaults to windows-1252 encoding if there are no UTF-8
characters in the first 1000 bytes. So for this feed, we get the wrong
encoding.

I inserted an explicit "utf8.Valid()" check, which fixes this problem.
2019-01-02 21:05:05 -08:00
..
testdata Update XML encoding regex to take single quotes into consideration 2018-12-12 21:13:06 -08:00
client.go Add the possibility to override default user agent for each feed 2018-09-19 18:19:24 -07:00
doc.go Add missing package descriptions for GoDoc 2018-10-08 17:32:17 -07:00
response.go Make UTF-8 the default encoding for XML feeds 2019-01-02 21:05:05 -08:00
response_test.go Update XML encoding regex to take single quotes into consideration 2018-12-12 21:13:06 -08:00