all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Adam Sjøgren" <asjo@koldfront.dk>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Resending email in Gnus, figuring out charset
Date: Mon, 29 Oct 2018 20:19:37 +0100	[thread overview]
Message-ID: <87in1ktvau.fsf@tullinup.koldfront.dk> (raw)

  Hi,

When I resend (S D r) an email in Gnus with headers like this:

  Content-Type: text/plain; charset=utf-8
  Content-Transfer-Encoding: 8bit

and utf-8 chars in the content (such as →, æ, ø and å), Gnus says it
doesn't know what charset to use, and asks if if I want to send it as
ASCII anyway.

I've edebugged my way into the function mm-find-mime-charset-region in
mm-util.el, which tries to figure out what charset the region is in.

Unfortunately (raw-text no-conversion) is not something the function
knows what to do with, and thus I get the prompt.

I guess the utf-8-ification has outrun this function?

I've applied the following hack locally, but I guess it isn't the
correct solution?

diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 25b156803a..67682f8b7d 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -572,7 +572,8 @@ mm-find-mime-charset-region
 		 (while systems
 		   (let* ((head (pop systems))
 			  (cs (or (coding-system-get head :mime-charset)
-				  (coding-system-get head 'mime-charset))))
+				  (coding-system-get head 'mime-charset)
+                                  (if (eq head 'raw-text) 'utf-8 nil))))
 		     ;; The mime-charset (`x-ctext') of
 		     ;; `compound-text' is not in the IANA list.  We
 		     ;; shouldn't normally use anything here with a


  Best regards,

    Adam

-- 
 "Your editor, having been blissfully unaware of the          Adam Sjøgren
  scourge of unnecessary calculators just waiting for    asjo@koldfront.dk
  their opportunity to overwhelm his desktop, has not
  yet come to love the new way of doing things."




             reply	other threads:[~2018-10-29 19:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29 19:19 Adam Sjøgren [this message]
2018-10-29 21:15 ` Resending email in Gnus, figuring out charset Andreas Schwab
2018-10-29 21:21   ` Adam Sjøgren
2018-10-30  6:23     ` Eli Zaretskii
2018-10-31 18:51       ` Adam Sjøgren
2018-10-31 18:59         ` Andreas Schwab
2018-10-31 19:42           ` Adam Sjøgren
2018-10-31 19:15         ` Eli Zaretskii
2018-10-31 19:43           ` Adam Sjøgren
2018-10-31 20:10             ` Eli Zaretskii
2018-10-31 20:22               ` Adam Sjøgren
2018-10-31 21:11                 ` Resending email in Gnus, figuring out charset [solved] Adam Sjøgren
2018-10-29 21:32   ` Resending email in Gnus, figuring out charset Adam Sjøgren
2018-10-29 21:38     ` Adam Sjøgren

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87in1ktvau.fsf@tullinup.koldfront.dk \
    --to=asjo@koldfront.dk \
    --cc=ding@gnus.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.