unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: charles@aurox.ch (Charles A. Roelli)
To: Eli Zaretskii <eliz@gnu.org>
Cc: 28266@debbugs.gnu.org
Subject: bug#28266: 25.2; RMAIL FCC coding issue
Date: Sun, 24 Sep 2017 10:47:29 +0200	[thread overview]
Message-ID: <m2shfclbz2.fsf@aurox.ch> (raw)
In-Reply-To: <83y3p6bioi.fsf@gnu.org> (message from Eli Zaretskii on Fri, 22 Sep 2017 23:08:13 +0300)

> Date: Fri, 22 Sep 2017 23:08:13 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > Date: Fri, 22 Sep 2017 20:39:45 +0200
> > From: charles@aurox.ch (Charles A. Roelli)
> > CC: 28266@debbugs.gnu.org
> > 
> > > Date: Fri, 22 Sep 2017 16:13:58 +0300
> > > From: Eli Zaretskii <eliz@gnu.org>
> > > 
> > > I cannot reproduce this with the current emacs-26 branch tip.
> > > However, in my case, Emacs asked for a suitable coding-system each
> > > time I wanted to send a message.  Answering UTF-8 produced a valid
> > > encoding in both cases.
> > > 
> > > So perhaps the difference, and the reason for a problem you see, is
> > > the default encoding in your case, which you didn't show.  (In my
> > > case, the default is Latin-1.)
> > 
> > Hmm, I was never queried for a coding system.
> 
> Because your default is UTF-8.  This is normal.
> 
> > I've repeated the issue on GNU/Linux with 25.3 and macOS with 25.3
> > and emacs-26.  And I don't set any special locales/language
> > environments:
> > 
> > > Important settings:
> > >   value of $LANG: en_GB.UTF-8
> > >   locale-coding-system: utf-8-unix
> 
> With en_US.UTF-8 on GNU/Linux, using the current emacs-26 branch, I
> see no problem: both messages are sent with a correct encoding.

Yes, I believe that in my case too, the messages are (or would be)
sent with the correct encoding.  The encoding issue I mentioned seems
to only apply to the saving of the mail buffer into the file specified
in the FCC header.

> What happens if you don't visit the FCC file after the first message
> is sent, only after the second?  Do you still see the second message
> encoded incorrectly?

No, in that case, both messages are encoded correctly.  The encoding
issue seems to only occur when the buffer is already open.

The text of the outgoing mail buffer is inserted into the file
specified by the FCC header using "insert-buffer-substring" in
function "rmail-output-to-rmail-buffer" (use C-u C-M-x on this
function before hitting C-c C-c y to resend the mail).  If you switch
to "tembuf" (argument to "rmail-output-to-rmail-buffer") in another
frame while debugging this function, you can see in the modeline that
its coding system is utf-8-unix.  Then if you switch to the buffer
containing the FCC file, the modeline indicates that it's unibyte.

Note also that variable "enable-multibyte-characters" is bound to nil
around this call.





  reply	other threads:[~2017-09-24  8:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 18:59 bug#28266: 25.2; RMAIL FCC coding issue Charles A. Roelli
2017-09-22 13:13 ` Eli Zaretskii
2017-09-22 18:39   ` Charles A. Roelli
2017-09-22 20:08     ` Eli Zaretskii
2017-09-24  8:47       ` Charles A. Roelli [this message]
2017-09-24 12:03         ` Alexis
2022-01-23 15:54           ` Lars Ingebrigtsen
2022-02-20 19:30             ` Lars Ingebrigtsen

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=m2shfclbz2.fsf@aurox.ch \
    --to=charles@aurox.ch \
    --cc=28266@debbugs.gnu.org \
    --cc=eliz@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).