From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88262 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: nntp servers with multibyte group names? Date: Tue, 27 Nov 2018 12:54:12 -0800 Message-ID: <871s766y2z.fsf@ericabrahamsen.net> References: <87tvk270sn.fsf@ericabrahamsen.net> <87in0i5l6h.fsf@tullinup.koldfront.dk> <87ftvm6zmn.fsf@ericabrahamsen.net> <87efb65kf6.fsf@tullinup.koldfront.dk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1543351961 20232 195.159.176.226 (27 Nov 2018 20:52:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2018 20:52:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+M36472@lists.math.uh.edu Tue Nov 27 21:52:37 2018 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRkLU-0005AR-R2 for ding-account@gmane.org; Tue, 27 Nov 2018 21:52:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.90_1) (envelope-from ) id 1gRkNO-0007zA-6a; Tue, 27 Nov 2018 14:54:34 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gRkNF-0007wL-9i for ding@lists.math.uh.edu; Tue, 27 Nov 2018 14:54:25 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1gRkND-0003Bg-HH for ding@lists.math.uh.edu; Tue, 27 Nov 2018 14:54:25 -0600 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRkNC-0006hs-Bh for ding@gnus.org; Tue, 27 Nov 2018 21:54:22 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gRkL2-0004g9-FC for ding@gnus.org; Tue, 27 Nov 2018 21:52:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:Rp452OxaMNwIoo0sTiqgfMqoJVs= X-Spam-Score: -1.1 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88262 Archived-At: Adam Sjøgren writes: > Eric writes: > >>> "o Although this specification allows UTF-8 for newsgroup names, they >>> SHOULD be restricted to US-ASCII until a successor to RFC 1036 >>> [RFC1036] standardises another approach. 8-bit encodings SHOULD >>> NOT be used because they are likely to cause interoperability >>> problems." >>> >>> - https://tools.ietf.org/html/rfc3977#section-10 >> >> Interesting! Thanks for that (I guess I could have looked that up >> myself). > > I was curious to find the answer, as I apparently have a hobby of > implementing an nntp-interface on average every half a decade :-) Sounds like... fun. But it also sounds like you might be able to answer some of my questions! >> I will assume for now that group names are coming in as ascii, but >> maybe leave a note in the code. > > Why not assume utf-8 (of which ascii is a subset, I believe)? I am miserable at encoding-related programming, it's something I've never really had to deal with, and I don't grok it. For instance: `nntp-make-process-buffer' disables multibyte, then `nntp-open-connection' sets both `coding-system-for-read' and `coding-system-for-write' to 'binary. This makes sense: everything is unibyte. If leave multibyte enabled, then set both coding-systems to 'utf-8, will that just magically work? Doesn't it depend to some extent on what the remote server is sending over the wire? Do I need to negotiate with the server somehow, or will Emacs have already taken care of that for me, in `open-network-stream'? (This is also something I should be asking on emacs.help, I guess.) Thanks for any light you're willing to shed! Eric