From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Very basic question regarding encoding and `open-network-stream'
Date: Tue, 27 Nov 2018 18:17:43 -0500 [thread overview]
Message-ID: <jwvd0qqm7uy.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 87efb65hn0.fsf@ericabrahamsen.net
> The NNTP RFC notes that the default character set for the protocol has
> changed from ascii to utf-8.
> (https://tools.ietf.org/html/rfc3977#section-1)
>
> What I don't grasp is: if the process buffers are left multibyte, and
> the `coding-system-for-read/write' variables are changed to 'utf-8 (or
> 'undecided?), will this simply do the right thing?
No: the stream of bytes includes NNTP protocol commands as well as other
contents (typically actual messages) and they don't all use utf-8.
So the stream process needs to communicate in bytes (aka "unibyte"), and
then the Elisp code needs to decode/encode each part manually according
to the coding system that applies to each part.
Stefan
next prev parent reply other threads:[~2018-11-27 23:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 21:34 Very basic question regarding encoding and `open-network-stream' Eric Abrahamsen
2018-11-27 23:17 ` Stefan Monnier [this message]
2018-11-27 23:41 ` 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=jwvd0qqm7uy.fsf-monnier+gmane.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--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).