feedparser icon indicating copy to clipboard operation
feedparser copied to clipboard

Fix issue #318: test failures when cchardet is installed

Open maksverver opened this issue 1 year ago • 0 comments

feedparser imports cchardet or chardet depending on what's installed: https://github.com/kurtmckee/feedparser/blob/11990ea1d8791acc76c67781f1d2011daf0c3a99/feedparser/encodings.py#L37-L40

Although these libraries are mostly equivalent, they return slightly different encoding strings, even though both are correct and lead to succesful decoding. This change allows the tests to be run with either library by accepting both encoding names as correct.

maksverver avatar Aug 29 '24 21:08 maksverver