help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is cp1252 special?


From: Reiner Steib
Subject: Re: Why is cp1252 special?
Date: Fri, 07 Oct 2005 20:14:36 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

On Fri, Oct 07 2005, Torsten Bronger wrote:

> Reiner Steib <reinersteib+from-uce@imap.cc> writes:
>> Please elaborate what's the problem in Gnus.
>
> The problem *was* that with some articles with undeclared encoding,
> Gnus used cp850 because my .emacs said
>
> (prefer-coding-system 'cp850)
> (prefer-coding-system 'iso-latin-1)
> (prefer-coding-system 'utf-8)

We already have a mechanism in Gnus to say "treat charset `windows-foo'
as `iso-8859-1', if we don't have `windows-foo': 

,----[ <f1> v mm-charset-synonym-alist RET ]
| mm-charset-synonym-alist is a variable defined in `mm-util'.
| Its value is 
| ((big5-hkscs . big5)
|  (unicode . utf-16-le)
|  (ks_c_5601-1987 . cp949))
| 
| Documentation:
| A mapping from invalid charset names to the real charset names.
`----

But (to my knowledge) we don't have a mechanism to say "treat
`iso-8859-1' as `windows-1252'".  `windows-1252' is a superset of
`iso-8859-1' so this would not hurt for correctly labeled `iso-8859-1'
postings, but it would display "labeled as `iso-8859-1', but in fact
it's `windows-1252'" too.  We also don't have "treat unlabeled
(undecided) as `what-ever'".

I will probably install a patch for this in No Gnus:

,----[ M-x customize-variable RET mm-charset-override-alist RET ]
| mm-charset-override-alist: 
| Set:
| [X] (iso-8859-1 . windows-1252)
| [ ] (undecided . windows-1252)
| [...]
| 
| A mapping from undesired charset names to their replacement.
| 
| You may add pair like (iso-8859-1 . windows-1252) here,
| i.e. treat iso-8859-1 as windows-1252.  windows-1252 is a
| superset of iso-8859-1.
`----

> What I observed is that (codepage-setup 1257) works but
> (codepage-setup 1252) yields "Unsupported codepage 1252".
>
>> [...]  I don't recall that (codepage-setup 1252) ever worked.
>
> Could this be because no mapping for 1252 appears in codepage.el?

Probably.  But it's not missing, because `windows-1252' is provided by
`code-pages.el, not by `codepage.el'.

I didn't remember that cp1257 was already present in `codepage.el'
whereas `windows-1252' is provided by `code-pages.el'.  From the
thread <http://thread.gmane.org/gmane.emacs.devel/41495>...

Eli Zaretskii:
| IIRC, `codepage-setup' was declared obsolete because the need to do
| something in order for a coding system to become available was
| deemed a bad idea.  But I don't remember the details, nor what would
| be the Right Way.  The birth of code-pages.el was accompanied by
| heated discussions, so some issues were lost in the dispute and
| never resolved.

Then, Kenichi Handa added the missing autoloads an changed the NEWS
entry:

,----[ etc/NEWS ]
| *** Many new coding systems are available in the `code-pages' library.
| These include complete versions of most of those in codepage.el, based
| on Unicode mappings.  `codepage-setup' is now obsolete and is used
| only in the MS-DOS port of Emacs.  All coding systems defined in
| `code-pages' are auto-loaded.
`----

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]