Gnus development mailing list
 help / color / mirror / Atom feed
* How to force charset iso-8859-1 when posting?
@ 2008-09-23 17:59 Steinar Bang
  2008-09-24 18:33 ` Steinar Bang
  2008-09-24 20:31 ` Reiner Steib
  0 siblings, 2 replies; 8+ messages in thread
From: Steinar Bang @ 2008-09-23 17:59 UTC (permalink / raw)
  To: ding

Platform: Ubuntu 8.04, Intel Pentium M
	GNU Emacs 22.1.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-05-03 on terranova, modified by Ubuntu
	No Gnus v0.11 (recent CVS update)

For some reason Gnus have decided to post with utf-8.  I've tried to
force iso-8859-1 with the below setting in the gnus-parameters variable
(I'm trying to force iso-8859-1 for the no. news hiearchy).

(setq gnus-parameters '(("^nntp\\+news\\.gmane\\."
			 (spam-process
			  ((spam spam-use-gmane))))
                        ("^no\\."
                         (mm-coding-system-priorities
                          '(iso-8859-1)))))

One of the groups already had the following in the group parameters:
 ((charset . iso-8859-1))
which I initially thought was meant to force the charset when posting,
but when I read the docs, it seems to be only related to reading.

Searching my memory further, I think I put it in there to force
iso-8859-15 over into iso-8859-1 when responding.

So... is there a working way to force the charset when posting, for a
group or set of groups?

Thanx!


- Steinar




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

* Re: How to force charset iso-8859-1 when posting?
  2008-09-23 17:59 How to force charset iso-8859-1 when posting? Steinar Bang
@ 2008-09-24 18:33 ` Steinar Bang
  2008-09-24 20:31 ` Reiner Steib
  1 sibling, 0 replies; 8+ messages in thread
From: Steinar Bang @ 2008-09-24 18:33 UTC (permalink / raw)
  To: ding

>>>>> Steinar Bang <sb@dod.no>:

> Platform: Ubuntu 8.04, Intel Pentium M
> 	GNU Emacs 22.1.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-05-03 on terranova, modified by Ubuntu
> 	No Gnus v0.11 (CVS update from today)

> For some reason Gnus have decided to post with utf-8.  I've tried to
> force iso-8859-1 with the below setting in the gnus-parameters
> variable (I'm trying to force iso-8859-1 for the no. news hiearchy).
[snip!]

I've now tried the following in ~/.gnus.el

(setq message-default-charset 'iso-8859-1)

But that didn't work either.  Gnus still posts with utf-8.

Annoying!




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

* Re: How to force charset iso-8859-1 when posting?
  2008-09-23 17:59 How to force charset iso-8859-1 when posting? Steinar Bang
  2008-09-24 18:33 ` Steinar Bang
@ 2008-09-24 20:31 ` Reiner Steib
  2008-09-26 15:59   ` Steinar Bang
  1 sibling, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2008-09-24 20:31 UTC (permalink / raw)
  To: ding

On Tue, Sep 23 2008, Steinar Bang wrote:

> Platform: Ubuntu 8.04, Intel Pentium M
> 	GNU Emacs 22.1.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-05-03 on terranova, modified by Ubuntu
> 	No Gnus v0.11 (recent CVS update)
>
> For some reason Gnus have decided to post with utf-8.  

Did you change your locale settings?

> I've tried to force iso-8859-1 with the below setting in the
> gnus-parameters variable (I'm trying to force iso-8859-1 for the
> no. news hiearchy).
>
> (setq gnus-parameters '(("^nntp\\+news\\.gmane\\."
> 			 (spam-process
> 			  ((spam spam-use-gmane))))
>                         ("^no\\."
>                          (mm-coding-system-priorities
>                           '(iso-8859-1)))))

Does setting mm-coding-system-priorities globally work?

> So... is there a working way to force the charset when posting, for a
> group or set of groups?

I once added such an example to (info "(emacs-mime)Encoding
Customization"), but Katsumi Yamaoka pointed out some
problems/limitations:

<http://thread.gmane.org/gmane.emacs.gnus.general/63762>

On Wed, Sep 24 2008, Steinar Bang wrote:
> I've now tried the following in ~/.gnus.el
> (setq message-default-charset 'iso-8859-1)
> But that didn't work either.  Gnus still posts with utf-8.

Hardly surprising: "Default charset used in non-MULE Emacsen."

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: How to force charset iso-8859-1 when posting?
  2008-09-24 20:31 ` Reiner Steib
@ 2008-09-26 15:59   ` Steinar Bang
  2008-09-26 21:24     ` Reiner Steib
  0 siblings, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2008-09-26 15:59 UTC (permalink / raw)
  To: ding

>>>>> Reiner Steib <reinersteib+gmane@imap.cc>:

> On Tue, Sep 23 2008, Steinar Bang wrote:
>> Platform: Ubuntu 8.04, Intel Pentium M
>> GNU Emacs 22.1.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-05-03 on terranova, modified by Ubuntu
>> No Gnus v0.11 (recent CVS update)
>> 
>> For some reason Gnus have decided to post with utf-8.  

> Did you change your locale settings?

Not intentionally, but perhaps Ubuntu has decided to do it for meg.  I
don't have a time frame from when this happened.

Hm... but I think you've put the finger on the problem.  In my ~/.bashrc
I do this:

# My own specific changes
# Norwegian/Swedish/Danish error messages from make, linkers and compilers
# are really confusing!
unset LANG
unset LANGUAGE
unset LANGUAGES

So when I do "env" from a command line I get nothing interesting.
However when I do `M-! env RET' I find 

LANG=en_US.UTF-8

So emacsen started from the menus don't get those environment changes. 

Is there a way to override this setting from inside emacs?

Will 
 (setenv "LANG" nil)
work, I wonder...?

Or is there a tidier lispish solution that tells Gnus to ignore the
locale? 

> Does setting mm-coding-system-priorities globally work?

I haven't tried yet.  I will.

>> So... is there a working way to force the charset when posting, for a
>> group or set of groups?

> I once added such an example to (info "(emacs-mime)Encoding
> Customization"), but Katsumi Yamaoka pointed out some
> problems/limitations:

> <http://thread.gmane.org/gmane.emacs.gnus.general/63762>

I'll study the thread closely.  It appears similar to what I tried (and
failed) to do with gnus-parameters...?

> On Wed, Sep 24 2008, Steinar Bang wrote:
>> I've now tried the following in ~/.gnus.el
>> (setq message-default-charset 'iso-8859-1)
>> But that didn't work either.  Gnus still posts with utf-8.

> Hardly surprising: "Default charset used in non-MULE Emacsen."

Indeed.  It was a shot in the dark.

Thanx!




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

* Re: How to force charset iso-8859-1 when posting?
  2008-09-26 15:59   ` Steinar Bang
@ 2008-09-26 21:24     ` Reiner Steib
  2008-09-27  8:53       ` Steinar Bang
  2008-09-28 14:33       ` Steinar Bang
  0 siblings, 2 replies; 8+ messages in thread
From: Reiner Steib @ 2008-09-26 21:24 UTC (permalink / raw)
  To: ding

On Fri, Sep 26 2008, Steinar Bang wrote:

> In my ~/.bashrc I do this:
[...]
> # Norwegian/Swedish/Danish error messages from make, linkers and compilers
> # are really confusing!

Then you might want to (un)set LC_MESSAGES.

> So emacsen started from the menus don't get those environment changes. 

I'd suggest to do the locale setting in ~/.profile instead of
~/.bashrc in order to get consistent settings.

> Will (setenv "LANG" nil) work, I wonder...?

Dunno.

> Or is there a tidier lispish solution that tells Gnus to ignore the
> locale? 

There's set-language-environment.

>> Does setting mm-coding-system-priorities globally work?
> I haven't tried yet.  I will.

Depending on where (whole session, Emacs, Gnus) the settings should be
applied, ~/.profile, set-language-environment or
mm-coding-system-priorities is the right thing.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: How to force charset iso-8859-1 when posting?
  2008-09-26 21:24     ` Reiner Steib
@ 2008-09-27  8:53       ` Steinar Bang
  2008-09-28 14:33       ` Steinar Bang
  1 sibling, 0 replies; 8+ messages in thread
From: Steinar Bang @ 2008-09-27  8:53 UTC (permalink / raw)
  To: ding

>>>>> Reiner Steib <reinersteib+gmane@imap.cc>:

> On Fri, Sep 26 2008, Steinar Bang wrote:
>> In my ~/.bashrc I do this:
> [...]
>> # Norwegian/Swedish/Danish error messages from make, linkers and compilers
>> # are really confusing!

> Then you might want to (un)set LC_MESSAGES.

Ok.  Good tip!  Thanx!  (of course the issue isn't a problem with the
current setting.  Basically I would like Norwegian locale settings,
wrt. to time zone, time formatting, keyboard layout, input methods
etc. but I prefer English names in menus, menu entries and error
messages (it makes it easier to google for stuff))

>> So emacsen started from the menus don't get those environment changes. 

> I'd suggest to do the locale setting in ~/.profile instead of
> ~/.bashrc in order to get consistent settings.

Hm... I have a ~/.profile file that sources ~/.bashrc if present.  There
are also comments in the ~/.profile saying it won't be read, if there is
a ~/.bash_profile or ~/.bash_login present.

And there is a ~/.bash_profile present, which also sources ~/.bashrc.

There is no ~/.bash_login (or ~/.login).

So I dunno.

Hm... ~/.bashrc is only read if in a bash.  Perhaps the shell, or
whatever, that launches the Gnome desktop is not a bash?

Will it help putting those settings directly in .profile?  Of course,
with a ~/.bash_profile present, that .profile will never be read in a
bash window...

This stuff is _confusing_...!  I guess that's why I put off messing with
it until something breaks so badly that I just _have_ to fix it (I have
my home directory checked into SVN, and what's in there have migrated
from SunOS through Solaris and several linuxen, as well as cygwin, until
it's gotten to where it is today).




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

* Re: How to force charset iso-8859-1 when posting?
  2008-09-26 21:24     ` Reiner Steib
  2008-09-27  8:53       ` Steinar Bang
@ 2008-09-28 14:33       ` Steinar Bang
  2008-09-28 14:41         ` Steinar Bang
  1 sibling, 1 reply; 8+ messages in thread
From: Steinar Bang @ 2008-09-28 14:33 UTC (permalink / raw)
  To: ding

>>>>> Reiner Steib <reinersteib+gmane@imap.cc>:


>>> Does setting mm-coding-system-priorities globally work?

>> I haven't tried yet.  I will.

> Depending on where (whole session, Emacs, Gnus) the settings should be
> applied, ~/.profile, set-language-environment or
> mm-coding-system-priorities is the right thing.

Right.  mm-coding-system-priorities is what I want, I think.  I'll try
setting it globally.




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

* Re: How to force charset iso-8859-1 when posting?
  2008-09-28 14:33       ` Steinar Bang
@ 2008-09-28 14:41         ` Steinar Bang
  0 siblings, 0 replies; 8+ messages in thread
From: Steinar Bang @ 2008-09-28 14:41 UTC (permalink / raw)
  To: ding

>>>>> Reiner Steib <reinersteib+gmane@imap.cc>:

>>>> Does setting mm-coding-system-priorities globally work?

Yes, setting mm-coding-system-priorities globally works for me.

I now have the following setting in my ~/.gnus.el :

;; We prefer good old latin1 over utf-8
(setq mm-coding-system-priorities '(iso-8859-1 utf-8))

Thanx!


- Steinar




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

end of thread, other threads:[~2008-09-28 14:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-23 17:59 How to force charset iso-8859-1 when posting? Steinar Bang
2008-09-24 18:33 ` Steinar Bang
2008-09-24 20:31 ` Reiner Steib
2008-09-26 15:59   ` Steinar Bang
2008-09-26 21:24     ` Reiner Steib
2008-09-27  8:53       ` Steinar Bang
2008-09-28 14:33       ` Steinar Bang
2008-09-28 14:41         ` Steinar Bang

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