title: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
body: <p>I am working google appengine python 2.5.</p>
  
  <p>I am experiencing unicodedecoderror on following code because myuser name has following value </p>
  
  <pre><code>userName     = unicode(userName).encode('utf-8') # äºï¼égãwmj is value in this variable  
  
  userName     = unicode(userName).encode('utf-8')
  strData = '{\"Sid\" :1, \"Oppid\" :%s, \"Aid\" :%s, \"EC\" :\"%s\", \"Name\" :\%s"' % (enemyID, userID, userEmpCode,userName)
  
  
     params = {'deviceToken'   : oDeviceToken,
                'message'       : strMessage,
                'CertificateId' : certificateId,
                'Data'          : strData
               }
  
  
  result = urlfetch.fetch(url = url,
               payload = urllib.urlencode(params),
               method  = urlfetch.POST,
               headers = {"Authorization" : authString},
               deadline = 30
               )
  </code></pre>
  
  <p>I am doing the following steps on username to encode it into utf-8 so that I could send it as payload.</p>
  
  <pre><code>username = unicode(username).encode(utf-8)
  </code></pre>
  
  <p>I believe the error occurs when I call <code>urllib.urlencode(params)</code></p>
  
  <p>Please guide what is going wrong.. or you can..</p>
  
  <p>and what  should be ultimate strategy to deal with unicode string on appengine python..</p>
  
  <p>I have tried different solutions reading different threads.. but still did not work</p>