nmdias / FeedKit

An RSS, Atom and JSON Feed parser written in Swift
MIT License
1.19k stars 173 forks source link

Encoding should use document encoding, rather than UTF-8 all the time #162

Open clementinelove opened 3 months ago

clementinelove commented 3 months ago

https://github.com/nmdias/FeedKit/blob/fb75f2a142f658c773953ab1a6885154a8624abb/Sources/FeedKit/Parser/XMLFeedParser.swift#L198

contents of this XML document shouldn't always be treated as UTF-8 Encoding, instead it should be decoded according to the encoding specified by the document, or, perhaps let the FeedParser accept a encoding argument.