#1470 If chardet do not return any result, go for the default one
Merged by pingou. Opened by pingou.
check_result  into  master

Download 1470.patch
no initial comment

The error was reported by email, reproduced and fixed locally and hotfixed in prod to keep things running.

It fixes accessing the URL: https://pagure.io/newt/blob/c8cddffd27a5aa8f7d6af7fca68e31d6aecd136d/f/newt.h (for example)

Would it be an idea to instead default to unicode?

I have just reused what @jcline used in #1462

rebased

Ohh, right, this is if the file is empty. Sure, fair enough then to use ascii :)

Well, #1462 was about empty files, this one fixes a situation I got from the logs, and I'm not sure why in this case we do not detect the encoding

Hmm, okay. Honestly, I'd say that if we can't discover it, we should default to unicode.

1 new commit added

  • If no encoding is returned, default to utf-8 instead of ascii

Pull-Request has been merged by pingou

Metadata