[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smtpmail support of unicode passwords

From: Stephen J. Turnbull
Subject: Re: smtpmail support of unicode passwords
Date: Mon, 14 Apr 2014 21:14:50 +0900

Eli Zaretskii writes:

 > My reading if the relevant RFCs is that UTF-8 must be used, but I'm no
 > expert in this area.

By relevant RFCs I assume you mean RFC 4616 (aka SASL "PLAIN")?

Indeed, the receiving server is going to expect that the string is
valid UTF-8.  That doesn't necessarily mean that Emacs has the string
as characters in internal encoding, appropriate to be encoded via the
utf-8 coding system before being sent on the wire.  It might also have
it as bytes read from a file using the binary codec (the main use case
I'm worried about), or the user may have learned to type it that way,

Of course if you know you have a string decoded using binary, you can
translate it using utf-8 before sending it back through utf-8 and then
onto the wire.

I guess it's actually quite likely that the binary file contains
Latin-N or some form of Cyrillic, etc, so if needed the decode-encode
cycle is probably the way to go.  So you may as well hard-code utf-8
here after all.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]