title: Why does doctest fail with string containing UTF-8 chars?
body: <p>I'm reading a plain ASCII html file (charset=utf-8) containing this string:</p>
  
  <blockquote>
    <p>&lt;title>Whatâ€™s New?&lt;/title></p>
  </blockquote>
  
  <p>This string is unusable as it is so I came up with this function (to be used after the string has been hexlify'd). Then, I included a docstring test:</p>
  
  <pre><code>def to_be_replaced(reprString):
      """
      :reprString: a repr(string) -- won't work otherwise
  
      &gt;&gt;&gt; s = "&lt;title&gt;Whatâ€™s New?&lt;/title&gt;"
      &gt;&gt;&gt; r = repr(s)
      &gt;&gt;&gt; print r
      &lt;title&gt;What\xe2\x80\x99s New?&lt;/title&gt;
      &gt;&gt;&gt; to_be_replaced(r)
      set(['\xe2\x80\x99'])
      """
      regex = re.compile('([\x7f-\xff]{2,})')
      return set(re.findall(regex, reprString))
  </code></pre>
  
  <p>Unfortunately, the test fails:</p>
  
  <pre><code>&gt;"E:\Python27\pythonw.exe" -u "test_to_be_replaced.py"
  
  to be replaced: set(['\xe2\x80\x99'])
  
  **********************************************************************
  File "test_to_be_replaced.py", line 14, in __main__.to_be_replaced
  Failed example:
      print r
  Expected:
      &lt;title&gt;Whatâ€™s New?&lt;/title&gt;
  Got:
      '&lt;title&gt;What\xe2\x80\x99s New?&lt;/title&gt;'
  **********************************************************************
  File "test_to_be_replaced.py", line 16, in __main__.to_be_replaced
  Failed example:
      to_be_replaced(r)
  Expected:
      set(['â€™'])
  Got:
      set([])
  **********************************************************************
  1 items had failures:
     2 of   4 in __main__.to_be_replaced
  ***Test Failed*** 2 failures.
  &gt;Exit code: 0
  </code></pre>
  
  <p>The output above from running:</p>
  
  <pre><code>if __name__ == '__main__':
      s = '&lt;title&gt;What\xe2\x80\x99s New?&lt;/title&gt;'
      print 'to be replaced:', to_be_replaced(s)  # works as intended
      import doctest
      doctest.testmod()
  </code></pre>
  
  <p>What can I do in order to make the test pass? </p>
  
  <p>Using python 2.7.10 on Windows 7 x32.</p>