Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Displaying Windows-1251 character set
@ 2005-04-04  9:04 David Sumbler
  2005-04-04  9:33 ` Reiner Steib
  0 siblings, 1 reply; 2+ messages in thread
From: David Sumbler @ 2005-04-04  9:04 UTC (permalink / raw)


Occasionally I get e-mails containing these headers:

Content-Type: text/plain; charset=Windows-1251
Content-Transfer-Encoding: 8bit

The contents appear as

\315\356\342\345\351\370\350\345

etc.  Sometimes I get e-mails with

Content-Type: text/html; charset=Windows-1251
Content-Transfer-Encoding: 8bit

and these appear as a lot of gibberish accented characters.

Most of these e-mails appear to be spam, so I'm not too bothered.

But how do I go about displaying these sensibly?  I'm running Fedora
Core 2 Linux, on a console set to UTF-8.

David

-- 

David Sumbler

Please reply with a followup to the newsgroup.

However, if you _really_ want to send me an e-mail,
replace "nospam" in my address with "aeolia".


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

* Re: Displaying Windows-1251 character set
  2005-04-04  9:04 Displaying Windows-1251 character set David Sumbler
@ 2005-04-04  9:33 ` Reiner Steib
  0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2005-04-04  9:33 UTC (permalink / raw)


On Mon, Apr 04 2005, David Sumbler wrote:

> Occasionally I get e-mails containing these headers:
>
> Content-Type: text/plain; charset=Windows-1251
> Content-Transfer-Encoding: 8bit
[...]
> But how do I go about displaying these sensibly?  I'm running Fedora
> Core 2 Linux, on a console set to UTF-8.

You need to setup Windows-1251 aka codepage 1251 with `codepage-setup'
and add an entry to `mm-charset-synonym-alist'.

I'd suggest the following code:

(eval-after-load "mm-util"
  '(progn
     (codepage-setup 1251)
     (when (and (not (mm-coding-system-p 'windows-1251))
		(mm-coding-system-p 'cp1251))
       (add-to-list 'mm-charset-synonym-alist
		    '(windows-1251 . cp1251)))))

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


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

end of thread, other threads:[~2005-04-04  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04  9:04 Displaying Windows-1251 character set David Sumbler
2005-04-04  9:33 ` 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).