🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #240842

Re: Message encodings

#240842
From: Ralph Fox
Date: Sun, 16 May 2010 02:52
64 lines
3481 bytes
On Sat, 15 May 2010 13:56:38 +0100, in message <69i2c7-7o4.ln1@gate.cowlark.com> 
David Given <dg@cowlark.com> wrote:

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

The better heuristic would be to select a default charset
depending on the prevailing language of the individual newsgroup 
(or newsgroup hierarchy). If your newsreader supports it, make 
exceptions for individual posters.

Reason:  In practice, virtually all Usenet messages without a charset 
are posted in the poster's national character set.


Examples:

  For English-language newsgroups -- charset = windows-1252    
   (Also for most other Western European languages).

  For Polish-language newsgroups  -- charset = iso-8859-2
   (Also for most other Central European languages using Latin script).

  For Russian-language newsgroups -- charset = KOI8-R
   (But not for many other languages using Cyrillic script.
   E.g. Bulgarian language posters use iso-8859-5)


Perhaps *ideally* (but not in practice), Usenet messages without a 
charset would use UTF-8.  In practice this would be a very bad choice 
of default/fallback charset for incoming messages without a charset.
Only a very small proportion of Usenet  messages without a charset 
actually use UTF-8 charset.  The reason being, those news clients 
which don't know how to provide MIME headers also don't understand 
UTF-8.


> (Incidentally, is it the case these days that all NNTP servers are 8-bit
> clean? 

Yes.


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

News servers do not re-encode messages in 7-bit.

(Unlike some *mail* servers which do.)


-- 
Regards
Ralph
Technical Details
Message-ID: <62luu598ir9e14o7k5pp8cj59vi59n80se@4ax.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!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news2.euro.net!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-03.dc1.easynews.com.POSTED!not-for-mail
References: <69i2c7-7o4.ln1@gate.cowlark.com>

Show Full Headers
Complete Article Headers
Message-ID: <62luu598ir9e14o7k5pp8cj59vi59n80se@4ax.com>
Subject: Re: Message encodings
Date: Sun, 16 May 2010 14:52:18 +1200
From: Ralph Fox <-rf-nz-@-.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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news2.euro.net!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-03.dc1.easynews.com.POSTED!not-for-mail
Newsgroups: news.software.readers
Organization: No; Y2.038Chaos instead!
X-Newsreader: Forte Agent 6.00/32.1186
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 64
X-Complaints-To: abuse@easynews.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise
 we will be unable to process your complaint properly.
X-Original-Bytes: 3233