title: Can't get a degree symbol into raw_input
body: <p>The problem in my code looks something like this:</p>
  
  <pre><code>#!/usr/bin/python
  # -*- coding: UTF-8 -*-
  
  deg = u'°'
  print deg
  print '40%s N, 100%s W' % (deg, deg)
  codelim = raw_input('40%s N, 100%s W)? ' % (deg, deg))
  </code></pre>
  
  <p>I'm trying to generate a raw_input prompt for delimiter characters inside a latitude/longitude string, and the prompt should include an example of such a string. <code>print deg</code> and <code>print '40%s N, 100%s W' % (deg, deg)</code> both work fine -- they return "°" and "40° N, 100° W" respectively -- but the <code>raw_input</code> step fails every time. The error I get is as follows:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\[rest of the path]\scratch.py", line 5, in  &lt;module&gt;
      x = raw_input(' %s W")? ' % (deg))
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 1:
  ordinal not in range(128)
  </code></pre>
  
  <p>I thought I'd have solved the problem by adding the encoding header, as instructed <a href="https://stackoverflow.com/questions/18091480/encoding-issue-with-printing-the-degree-symbol-on-a-word-document-using-docx">here</a> (and indeed that did make it possible to print the degree sign at all), but I'm still getting Unicode errors as soon as I add an otherwise-safe string to <code>raw_input</code>. What's going on here?</p>