From: Eli Zaretskii <eliz@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: smtpmail and ~/.authinfo
Date: Tue, 27 Sep 2011 07:31:23 -0400 [thread overview]
Message-ID: <E1R8Vsh-0007P6-0Q@fencepost.gnu.org> (raw)
In-Reply-To: <871uv2uv6j.fsf@lifelogs.com> (message from Ted Zlatanov on Tue, 27 Sep 2011 05:38:28 -0500)
> From: Ted Zlatanov <tzz@lifelogs.com>
> 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 <eliz@gnu.org> wrote:
>
> >> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> >> 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.
next prev parent reply other threads:[~2011-09-27 11:31 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-20 10:26 smtpmail and ~/.authinfo Eli Zaretskii
2011-08-21 4:39 ` Lars Magne Ingebrigtsen
2011-08-21 6:12 ` Eli Zaretskii
2011-08-21 19:25 ` Lars Magne Ingebrigtsen
2011-08-21 19:59 ` Eli Zaretskii
2011-08-21 20:17 ` Lars Magne Ingebrigtsen
2011-08-22 5:35 ` Eli Zaretskii
2011-09-10 19:01 ` Lars Magne Ingebrigtsen
2011-09-25 12:33 ` Ted Zlatanov
2011-09-25 12:48 ` Eli Zaretskii
2011-09-25 13:21 ` Ted Zlatanov
2011-09-25 17:08 ` Eli Zaretskii
2011-09-26 14:41 ` Ted Zlatanov
2011-09-26 16:18 ` Eli Zaretskii
2011-09-26 16:53 ` Ted Zlatanov
2011-09-26 17:15 ` Eli Zaretskii
2011-09-26 17:23 ` Eli Zaretskii
2011-09-26 17:31 ` Ted Zlatanov
2011-09-26 17:00 ` Stefan Monnier
2011-09-26 17:28 ` Ted Zlatanov
2011-09-26 21:27 ` Stefan Monnier
2011-09-26 18:04 ` Lars Magne Ingebrigtsen
2011-09-26 19:22 ` Ted Zlatanov
2011-09-26 19:30 ` Lars Magne Ingebrigtsen
2011-09-26 19:48 ` Ted Zlatanov
2011-09-26 21:31 ` Stefan Monnier
2011-09-26 21:43 ` Lars Magne Ingebrigtsen
2011-09-26 21:54 ` Ted Zlatanov
2011-09-27 4:07 ` Stephen J. Turnbull
2011-09-27 6:11 ` Lars Magne Ingebrigtsen
2011-09-27 10:29 ` Ted Zlatanov
2011-09-27 12:33 ` Stephen J. Turnbull
2011-09-27 20:15 ` Ted Zlatanov
2011-09-28 1:41 ` Stephen J. Turnbull
2011-09-28 8:38 ` Eli Zaretskii
2011-09-26 21:55 ` Ted Zlatanov
2011-09-27 2:57 ` Eli Zaretskii
2011-09-27 10:38 ` Ted Zlatanov
2011-09-27 11:31 ` Eli Zaretskii [this message]
2011-09-27 12:55 ` Stefan Monnier
2011-09-27 14:02 ` Jason Rumney
2011-09-26 19:34 ` Eli Zaretskii
2011-09-26 19:40 ` Ted Zlatanov
2011-09-27 2:51 ` Eli Zaretskii
2011-09-27 13:54 ` Jason Rumney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1R8Vsh-0007P6-0Q@fencepost.gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).