Gnus development mailing list
 help / color / mirror / Atom feed
* nail uses iso8859-1 instead of iso-8859-1
@ 2007-04-25 15:44 NAKAJI Hiroyuki
  2007-04-25 23:06 ` Katsumi Yamaoka
  2007-05-01 16:01 ` nail uses iso8859-1 instead of iso-8859-1 Reiner Steib
  0 siblings, 2 replies; 5+ messages in thread
From: NAKAJI Hiroyuki @ 2007-04-25 15:44 UTC (permalink / raw)
  To: ding

I found some emails are using charset ISO8859-1 which is as same as
iso-8859-1. For example, nail uses ISO8859-1.

Content-Type: text/plain; charset=ISO8859-1
User-Agent: nail 11.22 3/20/05

How about adding ISO8859-1 in mm-charset-synonym-alist?

--- mm-util.el	02 Mar 2007 22:32:29 +0900	7.62
+++ mm-util.el	26 Apr 2007 00:37:27 +0900	
@@ -229,6 +229,10 @@
     ,@(when (and (not (mm-coding-system-p 'windows-31j))
 		 (mm-coding-system-p 'cp932))
 	'((windows-31j . cp932)))
+    ;; ISO8859-1 is ISO-8859-1
+    ,@(when (and (not (mm-coding-system-p 'iso8859-1))
+		 (mm-coding-system-p 'iso-8859-1))
+	'((iso8859-1 . iso-8859-1)))
     )
   "A mapping from unknown or invalid charset names to the real charset names.
 

-- 
NAKAJI Hiroyuki



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

* Re: nail uses iso8859-1 instead of iso-8859-1
  2007-04-25 15:44 nail uses iso8859-1 instead of iso-8859-1 NAKAJI Hiroyuki
@ 2007-04-25 23:06 ` Katsumi Yamaoka
  2007-04-26 19:44   ` customizing mm-charset-synonym-alist (was: nail uses iso8859-1 instead of iso-8859-1) Reiner Steib
  2007-05-01 16:01 ` nail uses iso8859-1 instead of iso-8859-1 Reiner Steib
  1 sibling, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2007-04-25 23:06 UTC (permalink / raw)
  To: NAKAJI Hiroyuki; +Cc: ding

>>>>> In <86abwwtq52.fsf@ra333.heimat.gr.jp> NAKAJI Hiroyuki wrote:

> I found some emails are using charset ISO8859-1 which is as same as
> iso-8859-1. For example, nail uses ISO8859-1.

> Content-Type: text/plain; charset=ISO8859-1
> User-Agent: nail 11.22 3/20/05

> How about adding ISO8859-1 in mm-charset-synonym-alist?

Thanks.  I've added it in the Gnus trunk.  I've also made it use
defcustom, so you can now customize the alist easily.

Regards,



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

* customizing mm-charset-synonym-alist (was: nail uses iso8859-1 instead of iso-8859-1)
  2007-04-25 23:06 ` Katsumi Yamaoka
@ 2007-04-26 19:44   ` Reiner Steib
  2007-04-26 22:42     ` customizing mm-charset-synonym-alist Katsumi Yamaoka
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2007-04-26 19:44 UTC (permalink / raw)
  To: ding

On Thu, Apr 26 2007, Katsumi Yamaoka wrote:

> I've also made it use defcustom, so you can now customize the alist
> easily.

I think this is not a good idea.

1. `mm-charset-synonym-alist' is modified by mm-setup-codepage-*, so a
   user will see "CHANGED outside Customize; operating on it here may be
   unreliable."

,----
| ;; Initialize:
| (mm-setup-codepage-iso-8859)
| (mm-setup-codepage-ibm)
`----

2. The initial value depends on the availability of charsets (lots of
   `mm-coding-system-p's).  So it will change when using different
   Emacs versions and flavors.  But if the user has customized it,
   this conditionals are eliminated.

IMHO, if we want a customizable variable, we should create a new
variable (default: nil) and construct `mm-charset-synonym-alist' from
the new one, `mm-codepage-iso-8859-list' and `mm-codepage-ibm-list'
(using mm-setup-codepage-*).  A new setup function should check if the
cdr of each element is a valid charset and add it to
`mm-charset-synonym-alist'.


BTW, if former defvars are changed to defcustoms, the :version is the
one when it's made customizable, not when the defvar was introduced.
So ":version "21.1" is not correct.

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




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

* Re: customizing mm-charset-synonym-alist
  2007-04-26 19:44   ` customizing mm-charset-synonym-alist (was: nail uses iso8859-1 instead of iso-8859-1) Reiner Steib
@ 2007-04-26 22:42     ` Katsumi Yamaoka
  0 siblings, 0 replies; 5+ messages in thread
From: Katsumi Yamaoka @ 2007-04-26 22:42 UTC (permalink / raw)
  To: ding

>>>>> In <v98xce2a54.fsf_-_@marauder.physik.uni-ulm.de>
>>>>>	Reiner Steib wrote:

> On Thu, Apr 26 2007, Katsumi Yamaoka wrote:

>> I've also made it use defcustom, so you can now customize the alist
>> easily.

> I think this is not a good idea.

> 1. `mm-charset-synonym-alist' is modified by mm-setup-codepage-*, so a
>    user will see "CHANGED outside Customize; operating on it here may be
>    unreliable."

Oops.  I fully agree to not making it a user option.

> ,----
>| ;; Initialize:
>| (mm-setup-codepage-iso-8859)
>| (mm-setup-codepage-ibm)
> `----

> 2. The initial value depends on the availability of charsets (lots of
>    `mm-coding-system-p's).  So it will change when using different
>    Emacs versions and flavors.  But if the user has customized it,
>    this conditionals are eliminated.

> IMHO, if we want a customizable variable, we should create a new
> variable (default: nil) and construct `mm-charset-synonym-alist' from
> the new one, `mm-codepage-iso-8859-list' and `mm-codepage-ibm-list'
> (using mm-setup-codepage-*).  A new setup function should check if the
> cdr of each element is a valid charset and add it to
> `mm-charset-synonym-alist'.

I see.  Otherwise, it might not be necessary that a variable has
ones like `(iso8859-1 . iso-8859-1)' since such ones are able to
be corrected easily by a hard-wired program.

> BTW, if former defvars are changed to defcustoms, the :version is the
> one when it's made customizable, not when the defvar was introduced.
> So ":version "21.1" is not correct.

I must keep it in mind.  Thank you.  Anyway, I've made
`mm-charset-synonym-alist' revert to using `defvar'.

Regards,



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

* Re: nail uses iso8859-1 instead of iso-8859-1
  2007-04-25 15:44 nail uses iso8859-1 instead of iso-8859-1 NAKAJI Hiroyuki
  2007-04-25 23:06 ` Katsumi Yamaoka
@ 2007-05-01 16:01 ` Reiner Steib
  1 sibling, 0 replies; 5+ messages in thread
From: Reiner Steib @ 2007-05-01 16:01 UTC (permalink / raw)
  To: ding

On Wed, Apr 25 2007, NAKAJI Hiroyuki wrote:

> I found some emails are using charset ISO8859-1 which is as same as
> iso-8859-1. For example, nail uses ISO8859-1.
>
> Content-Type: text/plain; charset=ISO8859-1
> User-Agent: nail 11.22 3/20/05

BTW, I found that nail or it's successor Heirloom mailx does declare
mails correctly.  Depending on the locale, I got with ``echo "Bläh
föo"|mail -s "test: fü bär" my-address'' ...

SuSE 9.2; LC_CTYPE=de_DE@euro

  User-Agent: nail 11.4 8/29/04
  Content-Type: text/plain; charset=iso-8859-15

openSUSE 10.2; en_US

  User-Agent: Heirloom mailx 12.1 6/15/06
  Content-Type: text/plain; charset=iso-8859-1

openSUSE 10.2; en_US.UTF-8

  User-Agent: Heirloom mailx 12.1 6/15/06
  Content-Type: text/plain; charset=utf-8

Maybe the user just put a bogus "set charset=..." line in his
/etc/mail.rc or ~/.mailrc file.

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




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

end of thread, other threads:[~2007-05-01 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-25 15:44 nail uses iso8859-1 instead of iso-8859-1 NAKAJI Hiroyuki
2007-04-25 23:06 ` Katsumi Yamaoka
2007-04-26 19:44   ` customizing mm-charset-synonym-alist (was: nail uses iso8859-1 instead of iso-8859-1) Reiner Steib
2007-04-26 22:42     ` customizing mm-charset-synonym-alist Katsumi Yamaoka
2007-05-01 16:01 ` nail uses iso8859-1 instead of iso-8859-1 Reiner Steib

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