pauldix/feedzirra — Issue #76: String#sanitize won't work with encoding other than #<Encoding:ASCII-8BIT>
Author: skalee
Created: 2011-12-14 16:06:14+00:00
State: open

To reproduce:

wiki = Feedzirra::Feed.fetch_and_parse "https://pl.wikipedia.org/w/index.php?title=Specjalna:Ostatnie_zmiany&feed=atom"

wiki.title
=> "Wikipedia - Ostatnie zmiany [pl]"

wiki.title.sanitize
output error : unknown encoding ASCII-8BIT
=> ""

wiki.title.encode(Encoding::UTF_8).sanitize
=> "Wikipedia - Ostatnie zmiany [pl]"

Perhaps #sanitize should ensure that is working with UTF-8 (or should be fixed to work with other encodings).