title: 'utf-8' codec can't encode character '\udcc2': surrogates not allowed
body: <p>I am using Python 3.6.0b2.</p>
  
  <p>I am parsing a lot of emails.  This one particular email is a problem because I cannot print the display name of the email address.  Attempting to print the email address display name gives:</p>
  
  <pre><code>UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc2' in position 30: surrogates not allowed
  </code></pre>
  
  <p>Here is a test case piece of code that shows how to reproduce the problem:</p>
  
  <pre><code>(venv3.6) mailripper@ip-10-0-0-112:/opt/mailripper$ cat test.py
  from email import policy
  from email.headerregistry import Address
  from email.parser import BytesHeaderParser, BytesParser
  
  email_bytes = b'From: =?utf-8?Q?John_Smith=2C_Prince2=C2=AE=2CPMP=C2=AE=2C_CSM=C2?=\r\n =?utf-8?Q?=AE=2C_ITIL=C2=AE=2C_ISTQB=C2=AE?= &lt;jon.smith@example.org&gt;\r\n'
  msg = BytesHeaderParser(policy=policy.default).parsebytes(email_bytes)
  print(msg['from'])
  print(msg['from'].addresses[0].display_name)
  </code></pre>
  
  <p>Here is the error as generated by the above code:</p>
  
  <pre><code>(venv3.6) mailripper@ip-10-0-0-112:/opt/mailripper$ python test.py
  "John Smith, Prince2®,PMP®, CSM� �, ITIL®, ISTQB®" &lt;jon.smith@example.org&gt;
  Traceback (most recent call last):
    File "test.py", line 8, in &lt;module&gt;
      print(msg['from'].addresses[0].display_name)
  UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc2' in position 30: surrogates not allowed
  </code></pre>
  
  <p>And here is the display name as shown in the OSX email client, which appears to be able to parse it OK (this is a screenshot, cropped to be small):</p>
  
  <p><a href="https://i.stack.imgur.com/rH1Gf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rH1Gf.png" alt="enter image description here"></a></p>
  
  <p>My goal is to be able to process any email without unicode errors, and without writing custom unicode error handling code - is that possible?  </p>
  
  <p>Can anyone suggest what I can do to avoid getting Unicode errors when displaying email address display names?</p>