<p class="p1">Hi, </p><p class="p1">I'm trying to search some mails with SUBJECT criteria, but the problem is the encoding, I'm trying to search french terms (impalib and python V2.7)</p>
<p class="p1">I've tried few things, but I think the encoding is the problem, in my mail header I have something like this:</p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="p2"> =?iso-8859-1?Q?Job:_"Full_Backup_Les_Gr=E8ves_du_Lac")_?=</p></blockquote>
<p class="p1">I need to search unseen mail with the FROM and the SUBJECT criteria. I take those two in parameters in my python script and the second contain special caracters like é or è, so I encode the string like this:</p>

<p class="p1">             temp = header_encode(unicode('Les grèves','utf-8'), charset='iso-8859-1')</p>
<p class="p1">And the string is exactly the same as the header: </p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><p class="p1">=?iso-8859-1?q?Full_Backup_Les_Gr=E8ves?=</p></blockquote>
<p class="p1">But the search function doesn't find my email, and I don't know why, even if I try with the entire string of the subject.</p>
<p class="p1">I hope you can understand my question and my english (I'm from switzerland so my english is not so good) and you can answer me. </p>
<p class="p1">Thanks in advance and best regards</p><p class="p1">Valentin Mercier</p>