[3.7] bpo-36520: Email header folded incorrectly (GH-13608) by maxking · Pull Request #13910 · python/cpython

@websurfer5 @maxking

* bpo-36520: reset the encoded word offset when starting a new
line during an email header folding operation

* 📜🤖 Added by blurb_it.

* bpo-36520: add an additional test case, and provide descriptive
comments for the test_folding_with_utf8_encoding_* tests

* bpo-36520: fix whitespace issue

* bpo-36520: changes per reviewer request -- remove extraneous
backslashes; add whitespace between terminating quotes and
line-continuation backslashes; use "bpo-" instead of
"issue GH-" in comments
(cherry picked from commit f6713e8)

Co-authored-by: websurfer5 <49998481+websurfer5@users.noreply.github.com>