News for hackers. Stuff that matters.
Re:Mercurial’s journey to and reflections on Python 3 by CJefferson on Monday January 13, 2020 @06:51PM (#22040134)
I'll admit, I'm not positive what the encoding should be. However there is a bunch of people who do clearly send UTF-8, and I can also promise you there are headers out there which just have binary nonsense in them. See for example https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

If you want to handle all headers, you have to be prepared to just get binary data.

Re:Mercurial’s journey to and reflections on Python 3 by takeda on Tuesday January 14, 2020 @01:08PM (#22047458)
Yes, and using ISO-8859-1 is the way to handle them without issues. You will never get error when decoding it that way. If you are using UTF-8 there are character combinations that are invalid.