yes, I got to see the perl module , it use latin1 to encode it and it's different from
OutlookExpress and Becky. The two clients can correctly create and echo the folder
name .
here is the perl module's method. it's worked and not compatibly with OE and Bercky,
Can anybody save me ?
sub imap_utf7_decode {
my ($s) = @_;
# Algorithm
# On remplace , par / dans les BASE 64 (, entre & et -)
# On remplace les &, non suivi d'un - par +
# On remplace les &- par &
$s =~ s/&([^,&\-]*),([^,\-&]*)\-/&$1\/$2\-/g;
$s =~ s/&(?!\-)/\+/g;
$s =~ s/&\-/&/g;
return Unicode::String::utf7($s)->latin1;
}
sub imap_utf7_encode {
my ($s) = @_;
$s = Unicode::String::latin1($s)->utf7;
$s =~ s/\+([^\/&\-]*)\/([^\/\-&]*)\-/\+$1,$2\-/g;
$s =~ s/&/&\-/g;
$s =~ s/\+([^+\-]+)?\-/&$1\-/g;
return $s;
}
----- Original Message -----
From: "Sam Varshavchik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 22, 2002 12:09 PM
Subject: [courier-users] Re: maildir folder name with encode like .&bUuL1Q- , how
decode and encode?
forehead writes:
> you see, '����' encoded by imapd server to be : '&bUuL1Q-'
The IMAP server does not encode folder names. The folder name is encoded by
the IMAP client.
> but the perl module encoded that to be '&ALIA4gDKANQ-'
>
> so , what's wrong with that? :-(
Verify that both Perl, and your application, use the same character set for
encoding folder names into modified-utf7.
--
Sam
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
�٢��a{m4�*k�{O
)�X�jب�7�zZ)z��wޭ��x���v�o"���U��m���z�(��k�{ir�(������u�\~g(������ɚ�X��X���.�'��ǫ�X���(��~��zw�R{.n�+�����l��b��,���y�+���b��?�+-�w���.�'��ǫ