imaplib : password with accented chars in login commands

Donn Cave donn at u.washington.edu
Fri Dec 28 14:31:08 EST 2001


Quoth Samuel Krempp <krempp at trucs.en.trop.crans.ens-cachan.fr>:
| when I try using "é"  as a password in the login command, the imaplib 
| command raises exceptions.
|
| import imaplib
| M=imaplib.IMAP4('imap.free.fr')
| M.login("toto", "blaébla")
|
| imaplib.error: LOGIN command error: BAD ['Missing required argument to 
| LOGIN']
|
| It's quite a problem, since I wished I could use any french character 
| in my passwords,
| But I am not sure whether this is a bug in imaplib or a 'feature' of 
| the IMAP protocol, because the documentation
| http://www.python.org/doc/current/lib/imap4-objects.html
| says something I don't fully understand,
| about always quoting string used as password in the login command.
|
| Is this a bug, or am I doing something wrong ?

Some individual IMAP4 commands support an optional CHARSET modifier,
but in general the character set is assumed to be ASCII, which doesn't
include that character.  It's a feature of the protocol.  That's how
it looks to me, anyway.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list