title: Python, UnicodeDecodeError trying to print exception that contains non ascii chars
body: <p>When I get an exception as <code>cPickle.UnpicklingError: invalid load key, 'ÿ'.</code> and I try to print it, it raises a unicode decode error when I try to insert it into my (unicode) error message:</p>
  
  <pre><code>try:
      settings = _load()
  except cPickle.UnpicklingError, err:
      msg = _(u"Error reading ... (the error is: '%s')")
      cont = askYes(msg % err, _(u"Settings Load Error")) # raises
  </code></pre>
  
  <p>Tried workarounds as in  <code>msg % unicode(err.message, encoding='utf-8')</code> but apparently <code>err.message</code> is not valid unicode string ("UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 19: invalid start byte")</p>
  
  <p>So what is the most pythonic way to handle this ? Should I pass 'ignore' or 'replace' to <code>unicode()</code> ?</p>
  
  <p>Edit: <code>askYes(None, msg % repr(err), _(u"Settings Load Error"))</code> gives something like:</p>
  
  <pre><code>(the error is: 'UnpicklingError("invalid load key, '\xff'.",)'). # ff is ÿ
  </code></pre>
  
  <p>Does not blow but still...</p>
  
  <p>Edit2: the errors I reported are a bit mixed up with artificial ones:</p>
  
  <pre><code>u'%s' % "cPickle.UnpicklingError: invalid load key, 'ÿ'."
  Traceback (most recent call last):
    File "&lt;input&gt;", line 1, in &lt;module&gt;
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 44: ordinal \
      not in range(128)
  </code></pre>
  
  <p>That's from the interpreter inside pycharm - apparently <code>ÿ</code> is <code>'\xc3\xbf'</code> there (...)</p>