unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: determining process coding
Date: Fri, 13 Feb 2015 12:27:04 +0800	[thread overview]
Message-ID: <87r3tu4esn.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 83r3tv5e1e.fsf@gnu.org

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Eric Abrahamsen <eric@ericabrahamsen.net>
>> Date: Thu, 12 Feb 2015 18:24:16 +0800
>> 
>> Gnus opens a long-running connection to an IMAP server through a process
>> buffer, and while playing with the code, I tried (process-coding-system
>> (get-buffer-process (current-buffer))) while the IMAP buffer was
>> current, and it gave me (binary . binary).
>
> This probably means Gnus encodes text "by hand" before sending it.
> Look for encode-coding somewhere.

It turns out that, in `nnimap-open-connection-1', Gnus explicitly lets
`coding-system-for-read|write' to 'binary. The actual connection is
created inside that let, with `open-protocol-stream' (aka
`make-network-stream').

I really don't see much else relevant to coding. Most commands are sent
with `nnimap-send-command', which simply runs:

(process-send-string (get-buffer-process (current-buffer)) COMMAND)

The only de|encoding I see going on is with IMAP folder names, with the
IMAP variant of UTF-7.

>> Bonus points for any wisdom regarding dealing with IMAP servers that
>> don't accept UTF-8.
>
> Do they accept UTF-16?

The culprit here is Exchange 2003 servers. I don't have an account to
test with, so I'm trying to do as much background research as possible
before pestering users for help. Apparently they only accept US-ASCII as
a charset (but I don't see how that could be) -- at least, UTF-8 doesn't
work. I signed up for an outlook.com address to play with, but that
server (imap-mail.outlook.com) is much better behaved than the Exchange
one, and seems to accept UTF-8 just fine.

Thanks,
Eric




  reply	other threads:[~2015-02-13  4:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 10:24 determining process coding Eric Abrahamsen
2015-02-12 15:45 ` Eli Zaretskii
2015-02-13  4:27   ` Eric Abrahamsen [this message]
2015-02-13  8:41     ` Eli Zaretskii
2015-02-18  3:49       ` Eric Abrahamsen
2015-02-18 15:22         ` Eli Zaretskii
2015-02-21  4:21           ` Eric Abrahamsen

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=87r3tu4esn.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=help-gnu-emacs@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.
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).