From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: determining process coding Date: Fri, 13 Feb 2015 12:27:04 +0800 Message-ID: <87r3tu4esn.fsf@ericabrahamsen.net> References: <87egpv5sxb.fsf@ericabrahamsen.net> <83r3tv5e1e.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423801673 30353 80.91.229.3 (13 Feb 2015 04:27:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2015 04:27:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 13 05:27:47 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1YM7r0-0002Dj-9E for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Feb 2015 05:27:46 +0100 Original-Received: from localhost ([::1]:53314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM7qz-00012z-MK for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Feb 2015 23:27:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM7qn-00012g-Kg for help-gnu-emacs@gnu.org; Thu, 12 Feb 2015 23:27:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YM7qj-0001AQ-JS for help-gnu-emacs@gnu.org; Thu, 12 Feb 2015 23:27:33 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:54426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM7qj-0001AM-DW for help-gnu-emacs@gnu.org; Thu, 12 Feb 2015 23:27:29 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YM7qf-000258-1E for help-gnu-emacs@gnu.org; Fri, 13 Feb 2015 05:27:27 +0100 Original-Received: from 114.248.12.239 ([114.248.12.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Feb 2015 05:27:25 +0100 Original-Received: from eric by 114.248.12.239 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Feb 2015 05:27:25 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 114.248.12.239 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:7ufOxKftio42oOFWiWfPLoGi5Fc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102697 Archived-At: Eli Zaretskii writes: >> From: Eric Abrahamsen >> 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