help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: determining process coding


From: Eric Abrahamsen
Subject: Re: determining process coding
Date: Fri, 13 Feb 2015 12:27:04 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

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 via email to

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