Gnus development mailing list
 help / color / mirror / Atom feed
* Resending email in Gnus, figuring out charset
@ 2018-10-29 19:19 Adam Sjøgren
  2018-10-29 21:15 ` Andreas Schwab
  0 siblings, 1 reply; 14+ messages in thread
From: Adam Sjøgren @ 2018-10-29 19:19 UTC (permalink / raw)
  To: ding; +Cc: emacs-devel

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




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-10-31 21:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 19:19 Resending email in Gnus, figuring out charset Adam Sjøgren
2018-10-29 21:15 ` 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

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 NNTP newsgroup(s).