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
+1
Thanks
Pull-Request has been merged by pingou