From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: smtpmail support of unicode passwords Date: Mon, 14 Apr 2014 21:14:50 +0900 Message-ID: <871tx0glad.fsf@uwakimon.sk.tsukuba.ac.jp> References: <83k3atkpt0.fsf@gnu.org> <83ha5wl5iw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1397477729 5311 80.91.229.3 (14 Apr 2014 12:15:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2014 12:15:29 +0000 (UTC) Cc: Stefan Monnier , galex-713@galex-713.eu, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 14 14:15:22 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WZfnE-0006hh-WF for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2014 14:15:21 +0200 Original-Received: from localhost ([::1]:42773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZfnE-0001HJ-9j for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2014 08:15:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZfn4-00017s-2E for emacs-devel@gnu.org; Mon, 14 Apr 2014 08:15:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZfmw-0001qk-Bf for emacs-devel@gnu.org; Mon, 14 Apr 2014 08:15:09 -0400 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:49113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZfmo-0001k1-27; Mon, 14 Apr 2014 08:14:54 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id 2DEE4970A7C; Mon, 14 Apr 2014 21:14:51 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 107631A2C25; Mon, 14 Apr 2014 21:14:51 +0900 (JST) In-Reply-To: <83ha5wl5iw.fsf@gnu.org> X-Mailer: VM undefined under 21.5 (beta34) "kale" 2a0f42961ed4 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 130.158.97.224 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171424 Archived-At: 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, etc. 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.