title: Imaplib search for subject line with special characters using python
body: <p>I'm trying to search special characters subject lines using</p>
  
  <pre><code>typ, msg_ids = self.imap.uid('search', None, 'SUBJECT "Report #160496147 : "AU report QTD date wise MediaOps" from Dhruv Sapra"')
  </code></pre>
  
  <p>but it's raising a bad request command error.</p>
  
  <p>Any idea why its happening and any solution for it.</p>
  
  <p>the below solution is not working.</p>
  
  <p><a href="https://stackoverflow.com/questions/28375714/python3-imap-search-special-characters">Python3 IMAP search special characters</a></p>