From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: smtpmail and ~/.authinfo Date: Tue, 27 Sep 2011 07:31:23 -0400 Message-ID: References: <83ippsqsz8.fsf@gnu.org> <83hb5ay1rs.fsf@gnu.org> <87litc7qen.fsf@lifelogs.com> <87pqio69lr.fsf@lifelogs.com> <87vcsf1537.fsf@lifelogs.com> <8739fj13vb.fsf@lifelogs.com> <83ty7yg09z.fsf@gnu.org> <871uv2uv6j.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1317123102 25278 80.91.229.12 (27 Sep 2011 11:31:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2011 11:31:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 27 13:31:35 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R8Vst-0006Ql-8A for ged-emacs-devel@m.gmane.org; Tue, 27 Sep 2011 13:31:35 +0200 Original-Received: from localhost ([::1]:42565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Vss-0002Pd-PG for ged-emacs-devel@m.gmane.org; Tue, 27 Sep 2011 07:31:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Vsl-0002PV-Dz for emacs-devel@gnu.org; Tue, 27 Sep 2011 07:31:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8Vsh-000891-77 for emacs-devel@gnu.org; Tue, 27 Sep 2011 07:31:27 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:44396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8Vsh-00088v-4I for emacs-devel@gnu.org; Tue, 27 Sep 2011 07:31:23 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1R8Vsh-0007P6-0Q for emacs-devel@gnu.org; Tue, 27 Sep 2011 07:31:23 -0400 In-reply-to: <871uv2uv6j.fsf@lifelogs.com> (message from Ted Zlatanov on Tue, 27 Sep 2011 05:38:28 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:144397 Archived-At: > From: Ted Zlatanov > Date: Tue, 27 Sep 2011 05:38:28 -0500 > Reply-To: emacs-devel@gnu.org > > On Tue, 27 Sep 2011 05:57:28 +0300 Eli Zaretskii wrote: > > >> From: Stefan Monnier > >> Date: Mon, 26 Sep 2011 17:31:52 -0400 > >> > >> I think raw-text is more likely to work, based on what Lars says. > > EZ> That was also my conclusion. > > I think we should make an effort to make the netrc/authinfo file > shareable with other programs I agree. But to do that, it sounds like we are lacking some knowledge about the intended use of these files, especially when they are used in conjunction with external services. If someone can prepare an exhaustive list of such uses, or at least those we want to support, and tell what encodings can be used with each of them, we can take it from there the way you want it. But if such details are not known at the moment, we may actually break some legitimate uses, which would be a pity. > raw-text encoding is, to me, saying "we give up." Give up knowing exactly how the stuff is encoded, yes. There's nothing wrong with that; after all, we do that when we edit binary files, don't we? > I thought today, on most popular platforms, UTF-8 was the safest choice > if you want to share data that covers UCS. UCS and UTF-8 are not the same thing. Windows uses UCS (well, actually UTF-16) internally, but UTF-8 is seldom seen there, e.g. you will never see a file name encoded in UTF-8 on a Windows filesystem, except as an accident. Stephen gave you examples with CJK locales, where UTF-8 might not be as popular as you'd like it, even on Posix systems. And even in Europe there are a few locales which prefer single-byte encoding of some kind, AFAIK. So I think you are being overly optimistic in asserting that UTF-8 is "the safest choice". > The other objection to UTF-8 was that some binary sequences can't be > encoded by it. Remember, we're talking about passwords and other > legible tokens, not binary files. The likelihood of such a sequence in > a token is too small to matter IMO. So I still think raw-text is the > worse choice even though it's easier to make it. You read "binary" incorrectly. For the purposes of this discussion, "binary" == "arbitrary byte values". Not every 8-bit byte is valid as part of a UTF-8 sequence. If the authinfo file includes such bytes, it cannot be encoded in UTF-8, except if we use the Emacs extensions, which will be only useful for Emacs. Such bytes can easily come from some single-byte encoding, for example. To DTRT with such bytes, we _must_ know its precise encoding; then we could _recode_ it in UTF-8, and encode back when we send the string to external services. Once again, blindly assuming that UTF-8 is "safe" is not good enough, IMO. We need more details, if someone can provide them.