Article View: news.software.readers
Article #241283Re: Message encodings
From: Frank Slootweg
Date: Sun, 06 Jun 2010 20:18
Date: Sun, 06 Jun 2010 20:18
46 lines
3188 bytes
3188 bytes
On May 15, 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? > > (Incidentally, is it the case these days that all NNTP servers are 8-bit > clean? If not, does anyone know of a free news server that will > correctly reencode messages in 7-bit that I can use for testing?) Please tell us a little more about the reason for and context of your question. For example *where* will you put those heuristics? (Are you writing your own newsreader, 'plug-in' for a newsreader, etc.?) FWIW, I share Patrick's view: PL> IMHO the best is to let the user to choose by group. On fr.* by PL> example the charset will be something like iso-8859-15. That's exactly how 'my' newsreader - tin - can do it. You just define (in your 'attributes' file) a 'scope' of newsgroups (any combination of groups/hierarchies, including lists, wildcards and excludes) and the corresponding 'undeclared_charset'. A simple example: scope=nl* undeclared_charset=ISO-8859-1 You can also use it to make things *fail* intentionally, i.e. for example for *this* group: scope=news.software.readers undeclared_charset=US-ASCII Which makes a broken posting *display* as broken. I hope this helps.
Technical Details
Message-ID:
<872e57F68mU1@mid.individual.net>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!border1.nntp.ams.giganews.com!border-2.ams.xsnews.nl!feed.xsnews.nl!border-1.ams.xsnews.nl!69.16.177.254.MISMATCH!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!pe2.news.blueyonder.co.uk!blueyonder!news.astraweb.com!border5.newsrouter.astraweb.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.neu.edu.cn!news.newsmth.net!news.byr.edu.cn!feeds.phibee-telecom.net!news.osn.de!diablo2.news.osn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<69i2c7-7o4.ln1@gate.cowlark.com>Show Full Headers
Complete Article Headers
Message-ID: <872e57F68mU1@mid.individual.net>
Subject: Re: Message encodings
Date: Sun, 06 Jun 2010 20:18:47 +0000
From: Frank Slootweg <this@ddress.is.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!border1.nntp.ams.giganews.com!border-2.ams.xsnews.nl!feed.xsnews.nl!border-1.ams.xsnews.nl!69.16.177.254.MISMATCH!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!pe2.news.blueyonder.co.uk!blueyonder!news.astraweb.com!border5.newsrouter.astraweb.com!border2.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.neu.edu.cn!news.newsmth.net!news.byr.edu.cn!feeds.phibee-telecom.net!news.osn.de!diablo2.news.osn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.readers
Organization: NOYB
Lines: 46
X-Trace: individual.net 5cdFz1p5G8R6h1uUxIf8CgeFqCYYtMWp+3V/8yhZfxbu/1KT55
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:pR93uGMa7prepzXrWih27eC73+E=
User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX)
(CYGWIN_NT-6.0/1.5.22(0.156/4/2) (i686)) Hamster/2.0.2.2
X-Original-Bytes: 2932