🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #240862

Re: Message encodings

#240862
From: Patrick Lamaizière
Date: Sun, 16 May 2010 09:22
29 lines
2533 bytes
David Given :

> 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?

IMHO the best is to let the user to choose by group. On fr.* by example
the charset will be something like iso-8859-15. 

I don't think it is a good idea to treat them as utf-8. News clients
that use utf-8 are aware of mime-encoding and don't send raw utf-8. But
it is easy to test, if the text is a valid sequence of utf-8
characters you can be sure that the text is in utf-8.

> If not, does anyone know of a free news server that will correctly reencode
> messages in 7-bit that I can use for testing?

May be Mime-proxy, it is not a real news server but a proxy.
http://www.lamaiziere.net/mp_pagen.html
Technical Details
Message-ID: <hsodfo$26gp$1@news.davenulle.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.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!news.davenulle.org!not-for-mail
References: <69i2c7-7o4.ln1@gate.cowlark.com>

Show Full Headers
Complete Article Headers
Message-ID: <hsodfo$26gp$1@news.davenulle.org>
Subject: Re: Message encodings
Date: Sun, 16 May 2010 11:22:00 +0200
From: Patrick Lamaizière <adresse@est.invalid>
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.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!news.davenulle.org!not-for-mail
Newsgroups: news.software.readers
Organization: /dave/nulle
Lines: 29
Reply-To: patnews1@davenulle.org
NNTP-Posting-Host: 192.168.1.1
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.davenulle.org 1274001720 72217 192.168.1.1 (16 May 2010 09:22:00
 GMT)
X-Complaints-To: abuse@davenulle.org
NNTP-Posting-Date: Sun, 16 May 2010 09:22:00 +0000 (UTC)
User-Agent: XPN/1.2.6 (Street Spirit ; FreeBSD) Mime-proxy/2.4.c.2 (FreeBSD)
X-Face: U`ZY:md"a8A6D5I7E!-G'QqJErJDkXN}?Yh|^|N|q-Wc+?1ATRGB2syWIb&pXA1TJ#sJzdr1m)[5l!QDq{Cxut4i0|v(,E4C_rFouV;
 K'; G+|L/\/R2VoIl
X-Original-IP: 192.168.1.1