Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* iso-8859-1 in outgoing messages in spite of UTF-8 environment
@ 2007-02-02 13:50 Stein Arild Strømme
  2007-02-02 14:36 ` Pascal Bourguignon
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stein Arild Strømme @ 2007-02-02 13:50 UTC (permalink / raw)
  To: info-gnus-english

I have 

  (set-language-environment 'UTF-8)

How can I still get message-mode to use iso-8859-1 in outgoing
messages?  (I get complaints about UTF-8 email.)  Looking at the info
nodes for Message is quite confusing on this, and the things I have
tried do no seem to work, things like

  (setq mm-content-transfer-encoding-defaults '(iso-8859-1))
  (setq mm-body-charset-encoding-alist '(iso-8859-1 . 8bit))
  (setq message-posting-charset 'iso-8859-1)

I have these variables:

  message-default-charset is a variable defined in `message.el'.
  Its value is iso-8859-1

  message-posting-charset is a variable defined in `message.el'.
  Its value is iso-8859-1

Grateful for any hints.

SA
-- 
Stein Arild Strømme            +47 55584825, +47 95801887
Universitetet i Bergen                  Fax: +47 55589672     
Matematisk institutt, UiB     http://math.uib.no/stromme/         
Johs Brunsg 12, N-5008 BERGEN         stromme@math.uib.no

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

* Re: iso-8859-1 in outgoing messages in spite of UTF-8 environment
  2007-02-02 13:50 iso-8859-1 in outgoing messages in spite of UTF-8 environment Stein Arild Strømme
@ 2007-02-02 14:36 ` Pascal Bourguignon
  2007-02-02 14:53   ` Stein Arild Strømme
  2007-02-02 23:52 ` Kai Großjohann
       [not found] ` <mailman.3923.1170460511.2155.info-gnus-english@gnu.org>
  2 siblings, 1 reply; 5+ messages in thread
From: Pascal Bourguignon @ 2007-02-02 14:36 UTC (permalink / raw)
  To: info-gnus-english

stromme@math.uib.no (Stein Arild Strømme) writes:

> I have 
>
>   (set-language-environment 'UTF-8)

emacs lisp is case sensitive (like Common Lisp, but unlike Common
Lisp, the emacs lisp reader doesn't upcase everything on read by
default).  Therefore 

   (set-language-environment 'UTF-8)

is not the same as

   (set-language-environment 'utf-8)

and I don't know whether 

   (set-language-environment 'UTF-8)

will do anything good at all.


> How can I still get message-mode to use iso-8859-1 in outgoing
> messages?  (I get complaints about UTF-8 email.)  Looking at the info
> nodes for Message is quite confusing on this, and the things I have
> tried do no seem to work, things like
>
>   (setq mm-content-transfer-encoding-defaults '(iso-8859-1))
>   (setq mm-body-charset-encoding-alist '(iso-8859-1 . 8bit))
>   (setq message-posting-charset 'iso-8859-1)
>
> I have these variables:
>
>   message-default-charset is a variable defined in `message.el'.
>   Its value is iso-8859-1
>
>   message-posting-charset is a variable defined in `message.el'.
>   Its value is iso-8859-1
>
> Grateful for any hints.


In addition, you might add hooks to set the buffer encoding.

(defun mail-meat () (set-buffer-file-coding-system 'iso-8859-1))
(add-hook 'mail-setup-hook 'mail-meat)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Nobody can fix the economy.  Nobody can be trusted with their finger
on the button.  Nobody's perfect.  VOTE FOR NOBODY.

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

* Re: iso-8859-1 in outgoing messages in spite of UTF-8 environment
  2007-02-02 14:36 ` Pascal Bourguignon
@ 2007-02-02 14:53   ` Stein Arild Strømme
  0 siblings, 0 replies; 5+ messages in thread
From: Stein Arild Strømme @ 2007-02-02 14:53 UTC (permalink / raw)
  To: info-gnus-english

[Pascal Bourguignon]

| stromme@math.uib.no (Stein Arild Strømme) writes:
| 
| > I have 
| >
| >   (set-language-environment 'UTF-8)
| 
| emacs lisp is case sensitive (like Common Lisp, but unlike Common
| Lisp, the emacs lisp reader doesn't upcase everything on read by
| default).  Therefore 
| 
|    (set-language-environment 'UTF-8)
| 
| is not the same as
| 
|    (set-language-environment 'utf-8)
| 
| and I don't know whether 
| 
|    (set-language-environment 'UTF-8)
| 
| will do anything good at all.

I'm not claiming anything about the goodness of it, but it does work :-)

| > How can I still get message-mode to use iso-8859-1 in outgoing
| > messages?  (I get complaints about UTF-8 email.)  Looking at the info
| > nodes for Message is quite confusing on this, and the things I have
| > tried do no seem to work, things like
| >
| >   (setq mm-content-transfer-encoding-defaults '(iso-8859-1))
| >   (setq mm-body-charset-encoding-alist '(iso-8859-1 . 8bit))
| >   (setq message-posting-charset 'iso-8859-1)
| >
| > I have these variables:
| >
| >   message-default-charset is a variable defined in `message.el'.
| >   Its value is iso-8859-1
| >
| >   message-posting-charset is a variable defined in `message.el'.
| >   Its value is iso-8859-1
| >
| > Grateful for any hints.
| 
| 
| In addition, you might add hooks to set the buffer encoding.
| 
| (defun mail-meat () (set-buffer-file-coding-system 'iso-8859-1))
| (add-hook 'mail-setup-hook 'mail-meat)

OK, I tried this (with message-setup-hook instead), and this does
indeed set the message composing buffer to iso-8859-1 (as read off
from the mode line).  However, when I send the message using C-c C-c,
it still turns into utf-8.

SA
-- 
Stein Arild Strømme            +47 55584825, +47 95801887
Universitetet i Bergen                  Fax: +47 55589672     
Matematisk institutt, UiB     http://math.uib.no/stromme/         
Johs Brunsg 12, N-5008 BERGEN         stromme@math.uib.no

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

* Re: iso-8859-1 in outgoing messages in spite of UTF-8 environment
  2007-02-02 13:50 iso-8859-1 in outgoing messages in spite of UTF-8 environment Stein Arild Strømme
  2007-02-02 14:36 ` Pascal Bourguignon
@ 2007-02-02 23:52 ` Kai Großjohann
       [not found] ` <mailman.3923.1170460511.2155.info-gnus-english@gnu.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Kai Großjohann @ 2007-02-02 23:52 UTC (permalink / raw)
  To: info-gnus-english

stromme@math.uib.no (Stein Arild Strømme) writes:

> I have 
>
>   (set-language-environment 'UTF-8)
>
> How can I still get message-mode to use iso-8859-1 in outgoing
> messages?

See the variable mm-coding-system-priorities.  For example, (setq
mm-coding-system-priorities '(latin-1 utf-8)) will ensure that Latin-1
is chosen over UTF-8 if possible.  You may wish to list more encodings
in that list, though.

Kai

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

* Re: iso-8859-1 in outgoing messages in spite of UTF-8 environment
       [not found] ` <mailman.3923.1170460511.2155.info-gnus-english@gnu.org>
@ 2007-02-07  7:32   ` Stein Arild Strømme
  0 siblings, 0 replies; 5+ messages in thread
From: Stein Arild Strømme @ 2007-02-07  7:32 UTC (permalink / raw)
  To: info-gnus-english

[Kai Großjohann]

| stromme@math.uib.no (Stein Arild Strømme) writes:
| 
| > I have 
| >
| >   (set-language-environment 'UTF-8)
| >
| > How can I still get message-mode to use iso-8859-1 in outgoing
| > messages?
| 
| See the variable mm-coding-system-priorities.  For example, (setq
| mm-coding-system-priorities '(latin-1 utf-8)) will ensure that Latin-1
| is chosen over UTF-8 if possible.  

Thank you very much, that seems to be exactly right.

SA
-- 
Stein Arild Strømme            +47 55584825, +47 95801887
Universitetet i Bergen                  Fax: +47 55589672     
Matematisk institutt, UiB     http://math.uib.no/stromme/         
Johs Brunsg 12, N-5008 BERGEN         stromme@math.uib.no

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

end of thread, other threads:[~2007-02-07  7:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-02 13:50 iso-8859-1 in outgoing messages in spite of UTF-8 environment Stein Arild Strømme
2007-02-02 14:36 ` Pascal Bourguignon
2007-02-02 14:53   ` Stein Arild Strømme
2007-02-02 23:52 ` Kai Großjohann
     [not found] ` <mailman.3923.1170460511.2155.info-gnus-english@gnu.org>
2007-02-07  7:32   ` Stein Arild Strømme

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