imap_utf7 calls and Exchange server

Robert Marchand robert.marchand@UMontreal.CA
Thu, 21 Feb 2002 15:10:15 -0500


Hi,

     we have begun to use an Exchange Server here at University and I found 
that the folders with accents are not shown like they should.  For example 
the folder "Éléments envoyés" appears as nothing in Netscape 4.7 and as " 
Él éments envoy és" in Explorer 5.5 (looking at the source).  This is in 
IMP 3.0 on Redhat 7.2 (with the IMP rpms).

After some tests with an IMP 2.2.7 version, I manage to make it work be 
replacing all the "imap_utf7_encode" with mb_convert_encoding($var, 
"UTF7-IMAP", "ISO-8859-1") and the "imap_utf7_decode" with 
mb_convert_encoding($var, "auto", "UTF7-IMAP").

I filed a report to PHP but have had no response so far.  In our case 
(Exchange Server) it appears that the imap_utf7 may be broken.  I've also 
found that UW-imapd does not bother at all with UTF7.  We have strange 
names all over our server:

M&60-moire
&AMk-l&AOk-ments envoy&AOk-s
etc...

The last one correspond to "Éléments envoyés" in modified UTF-7 according 
to Exchange.
If the folder is created with IMP 3.0 the name is:

&yQ-l&6Q-ments envoy&6Q-s

Why the difference?
Since UW-imapd doesn't use UTF7, i'd like to know the context in which the 
imap_utf7_* calls have been added to IMP.  For which servers? It certainly 
don't look it works with the Microsoft one.

Thanks.
-------
Robert Marchand                 tél: 343-6111 poste 5210
DGTIC-SIT                       e-mail: robert.marchand@umontreal.ca
Université de Montréal          Montréal, Canada