From: Kenichi Handa <handa@m17n.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: What does `undecided' do for encoding text?
Date: Wed, 11 Feb 2009 18:20:34 +0900 [thread overview]
Message-ID: <E1LXBGk-0000sx-Pp@etlken> (raw)
In-Reply-To: <uocxatswu.fsf@gnu.org> (message from Eli Zaretskii on Tue, 10 Feb 2009 13:47:45 +0200)
In article <uocxatswu.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> > From: Kenichi Handa <handa@m17n.org>
> > CC: emacs-devel@gnu.org
> > Date: Tue, 10 Feb 2009 20:16:53 +0900
> >
> > > This may have nothing to do with what the programmer did. My use case
> > > was in Rmail: if the original message had non-ASCII text encoded with
> > > QP or B64, Rmail would (correctly) return `undecided' when it detects
> > > the message encoding. Suppose you then edit the message and add
> > > non-ASCII characters as raw bytes, e.g. by base64-decode-region, and
> > > type "C-c C-c". rmail-cease-edit now needs to encode the text and put
> > > it back into the mbox buffer, and the immediate choice it has for the
> > > pertinent coding-system is to use buffer-file-coding-system of the
> > > buffer where the message was edited. But the value of
> > > buffer-file-coding-system in that buffer is `undecided'...
> >
> > The situation is the same as visiting an ASCII only file,
> > entering some non-ASCII characters, and saving it. In that
> > case, we use selecte-safe-coding-system to decide the coding
> > system to encode the buffer contents.
> I think that's a different situation: base64-decode-region inserts raw
> bytes, not non-ASCII characters. So select-safe-coding-system may not
> work correctly, because (AFAIK) it was not designed for that case.
Have you tried it? select-safe-coding-system should suggest
raw-text if the buffer contains raw bytes.
---
Kenichi Handa
handa@m17n.org
next prev parent reply other threads:[~2009-02-11 9:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-07 15:32 What does `undecided' do for encoding text? Eli Zaretskii
2009-02-10 7:01 ` Kenichi Handa
2009-02-10 9:22 ` Eli Zaretskii
2009-02-10 11:16 ` Kenichi Handa
2009-02-10 11:47 ` Eli Zaretskii
2009-02-11 9:20 ` Kenichi Handa [this message]
2009-02-10 22:04 ` Stefan Monnier
2009-02-16 11:44 ` Kenichi Handa
2009-02-16 13:47 ` Stefan Monnier
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=E1LXBGk-0000sx-Pp@etlken \
--to=handa@m17n.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@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).