title: UnicodeDecodeError: 'utf8' codec can't decode byte - Euro Symbol
body: <p>I build a connection to the Google Finance API which gives me stock quotes. Everything is working fine until I switch to courses from Europe. These contain the € Symbol and I get following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Administrator\Desktop\getQuotes.py", line 32, in &lt;module&gt;
      quote = c.get("SAP","FRA")
    File "C:\Users\Administrator\Desktop\getQuotes.py", line 21, in get
      obj = json.loads(content[3:])
    File "C:\Python27\lib\json\__init__.py", line 338, in loads
      return _default_decoder.decode(s)
    File "C:\Python27\lib\json\decoder.py", line 365, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "C:\Python27\lib\json\decoder.py", line 381, in raw_decode
      obj, end = self.scan_once(s, idx)
  UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: invalid start byte
  </code></pre>
  
  <p>The following is the code I am using. I guess that the error appears while the json is trying to processing the string but he can not resolve the euro symbol:</p>
  
  <pre><code>import urllib2
  import json
  import time
  
  class GoogleFinanceAPI:
      def __init__(self):
          self.prefix = "http://finance.google.com/finance/info?client=ig&amp;q="
  
      def get(self,symbol,exchange):
          url = self.prefix+"%s:%s"%(exchange,symbol)
          u = urllib2.urlopen(url)
          content = u.read()
  
          obj = json.loads(content[3:])
          return obj[0]
  
  
  if __name__ == "__main__":
      c = GoogleFinanceAPI()
  
      while 1:
          quote = c.get("MSFT","NASDAQ")
          print quote
          time.sleep(30)
  </code></pre>
  
  <p>This is how it Google Finance gives me the output for the SAP Stock containing the Euro symbol:</p>
  
  <pre><code>// [ { "id": "8424920" ,"t" : "SAP" ,"e" : "FRA" ,"l" : "56.51" ,"l_cur" : "€56.51" ,"s": "0" ,"ltt":"8:00PM GMT+2" ,"lt" : "Aug 7, 8:00PM GMT+2" ,"c" : "-0.47" ,"cp" : "-0.82" ,"ccol" : "chr" } ]
  </code></pre>
  
  <p>I tried to use this function and instead of the opener the (content[3:]) part but with this I got the same error, also that instead of an utf-8 I got an ascii error.</p>
  
  <pre><code>json.loads(unicode(opener.open(...), "ISO-8859-15"))
  </code></pre>
  
  <p>If someone has an idea I would be very happy.</p>