Subject: Search with umlauts

From: Jochen Garcke <[email-masked]>
Date: Tue, 27 Aug 2002 19:33:01 +0200

Hi,

I have a problem using mail_search for mails with umlauts in From, 
Subject or so... See the following IMAP output:

00000077 SEARCH CHARSET ISO-8859-1 ALL SENTON 13-Mar-2002 FROM "XXXX <[email-masked]>" TO "[email-masked] (Jochen Garcke)" SUBJECT "Re: =?iso-8859-1?Q?Komplexit=E4t_des_Einf=FCge?="
* SEARCH
00000077 OK SEARCH done.

I would think that this should work or am I missing something ?

Thanks for any info,
  Jochen

-- 
Jochen Garcke                                     mail: [email-masked]
Institut fuer Angewandte Mathematik, Uni Bonn   wissrech.iam.uni-bonn.de
GCD Deutschland (Die Comic Datenbank)                  www.garcke.de/GCD
The future is viridian                            www.viridiandesign.org 
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Tue, 27 Aug 2002 10:51:23 -0700 (Pacific Daylight Time)

> 00000077 SEARCH CHARSET ISO-8859-1 ALL SENTON 13-Mar-2002 FROM "XXXX <[email-masked]>" TO "[email-masked] (Jochen Garcke)" SUBJECT "Re: =?iso-8859-1?Q?Komplexit=E4t_des_Einf=FCge?="

The problem is that you are giving a MIME encoded-word as the text for the
SUBJECT search.

You need to give an 8-bit string in the character set identified by the
CHARSET after SEARCH.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

---

From: Jochen Garcke <[email-masked]>
Date: Tue, 27 Aug 2002 22:39:09 +0200

> You need to give an 8-bit string in the character set identified by the

I assumed that I could use the subject which I get via e.g. 
mail_fetchenvelope or mail_fetchheader, which the above is, 
for a search via mail_search. 
So that is not the case ?

Is there an easy way to convert the above into an 8-bit string ?

Thanks,
  Jochen

---

From: Mark Crispin <[email-masked]>
Date: Tue, 27 Aug 2002 13:48:25 -0700 (Pacific Daylight Time)

> So that is not the case ?

That is correct.  You have to convert MIME encoded-words into 8-bit string
with charset.

> Is there an easy way to convert the above into an 8-bit string ?

You must either convert the MIME encoded-word yourself, or you can use
utf8_mime2text() and do a CHARSET UTF-8 (as opposed to CHARSET ISO-8859-1)
search.

-- Mark --