title: Downloading a file with Chinese characters in the name in Django with HttpResponse
body: <p>I want to download a file with Django's <code>httpresponse</code> method. The name of the file has some special characters, like Chinese. I can download the file with the following code, but the file name appears as "%E6%B8%B8%E6%88%8F%E6%B5%8F%E8%A7%88%E5%99%A8%E6%B3%A8%E5%86%8C%E9%A1%B5%E9%9D%A2.jpg".</p>
  
  <p>Could anyone tell me how to convert the file name?</p>
  
  <pre><code>response = HttpResponse(attachment.file, content_type='text/plain',mimetype='application/octet-stream')
  
  response['Content-Disposition'] = "attachment; filename="+urlquote(filename)
  return response
  </code></pre>
  
  <p><strong>Edit</strong>:</p>
  
  <p>Another problem comes out when using <code>smart_str</code>, the file name can be displayed normally in Firefox and Chrome, but not in IE: in IE it's still displaying some unknown characters. Does anyone know how to fix this problem?</p>
  
  <p>Thanks in advance!</p>
  
  <p>---solved by use <code>urlquote</code> and <code>smart_str</code> differently in IE and other browsers.</p>