title: Why do I get encoding error in python warnings.formatwarning on format string?
body: <p>I get encoding error on this line:</p>
  
  <pre><code>s =  "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message)
  </code></pre>
  
  <p>UnicodeEncodeError: 'ascii' codec can't encode character u'\xc4' in position 44: ordinal not in range(128)</p>
  
  <p>I tried to reproduce this error by passing all combinations of parameters to string format, but closest I got was "ascii decode" error (by passing unicode and high ascii string simultaneously, which forced conversion of string to unicode, using ascii decoder.</p>
  
  <p>However, I did not manage to get "ascii encode" error. Anybody has an idea?</p>