🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #240824

Re: Message encodings

#240824
From: Christian Ebert
Date: Sat, 15 May 2010 13:26
47 lines
3037 bytes
* David Given on Saturday, May 15, 2010:
> Usenet messages are, AIUI, supposed be either (a) valid MIME messages
> with a content-type, charset and transfer-encoding; or (b) non-MIME
> messages in 7-bit ASCII.
> 
> However, in practice there are lots of messages floating around that
> violate these rules, usually by using high-bit bytes where they're not
> supposed to (either in headers, where they're supposed to use MIME
> encoded-words instead, or in a message body in a non-MIME message).
> 
> What's the best thing to do when decoding these? Do I just treat them as
> ISO-8859-1 and hope for the best, or are there better heuristics I
> should use?

Well, iso-8859-1 is mostly useful for western Europeans -- and
then defaulting to cp1252 would probably better. Anyway, I
believe you should offer a configuration setting.

Have a look a Thomas Wiegner's us-ascii override patch for slrn:

http://www.foory.de/thw/slrn/

The Mutt mailer also has a good mechanism via the charset-hook
command. My muttrc has this:

#v+
charset-hook ^unknown-8bit$   cp1252
charset-hook ^x-unknown$      cp1252
charset-hook ^none$           cp1252
charset-hook ^x-user-defined$ cp1252
charset-hook ^us-ascii$       cp1252
charset-hook ^iso-8859-1$     cp1252
charset-hook ^iso-8859-8-i$   iso-8859-8
charset-hook ^gb2312$         gb18030
#v-

Welcome to charset hell!

c

P.S. Why do I get the feeling you're trying to reinvent the
wheel? ;-)
-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org/
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions
Technical Details
Message-ID: <o1k2c7x0b3.ln2@krille.blacktrash.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.mixmin.net!news.albasani.net!krille.blacktrash.org!not-for-mail
References: <69i2c7-7o4.ln1@gate.cowlark.com>

Show Full Headers
Complete Article Headers
Message-ID: <o1k2c7x0b3.ln2@krille.blacktrash.org>
Subject: Re: Message encodings
Date: Sat, 15 May 2010 15:26:48 +0200
From: Christian Ebert <blacktrash@gmx.net>
References: <69i2c7-7o4.ln1@gate.cowlark.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.mixmin.net!news.albasani.net!krille.blacktrash.org!not-for-mail
Newsgroups: news.software.readers
Organization: Black Trash Productions http://www.blacktrash.org/
Lines: 47
X-Trace: news.albasani.net
 Pp+l5vgXkSJlj4PPt7J23TVS1zXvSDzG0PxMEePEIOoqpoATjBsYZ1oXG5zKEB2bhtj+wZgoIt/D0NQJOQbcJRMnrduiz7BIwGBAIhjsz1CxGXMCtqs5HkPooz0W+R9e
X-Complaints-To: abuse@albasani.net
NNTP-Posting-Date: Sat, 15 May 2010 13:26:57 +0000 (UTC)
X-User-ID: +BEXWb3Pv31zUh5nj8Y7Dxy25Rd/CUhMYTQm+P0AXlo=
X-Face: )&#alA:[x"-#%%./(nuC&8n; #gqM; =mfY&ivRz@Gnv|AD_0l1Uz{fnJ^BW~OX[d;
 /)z!y V
Cancel-Lock: sha1:17Wb84Xsna9LOcyqVKXx60f4Shs=
User-Agent: slrn/pre1.0.0-18/mm/ao/mc (Darwin)
X-NNTP-Posting-Host: YNLwn6obGFks4TSHfJ/JvNmAlgivOqnb3XEm9JhPZUg=
Mail-Copies-To: nobody
X-Original-Bytes: 2837