🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #73683

8 bit headers (was: Your Answer ??? Your comment???)

#73683
From: J.B. Moreno
Date: Fri, 16 Mar 2001 19:42
60 lines
3885 bytes
William McBrine <wmcbrine@telocity.com> wrote:

> On Thu, 8 Mar 2001 11:38:31 -0500, J.B. Moreno wrote:
> 
> > Except that utf-8 is going to be the new standard and interpreting it
> > doesn't require the MIME header.
> 
> When? And more importantly: How? Unlabelled iso-8859-1 is everywhere. It's
> the de facto standard. Any newsreader that starts putting out unlabelled
> UTF-8 is going to be a disaster.

No more so than any other unlabeled charset, and 8859-1 isn't the only
unlabeled charset being used.

Some interesting facts about this at: 
  <http://www.ehsco.com/opinion/20010305.html>

> Any newsreader that starts interpreting unlabelled 8-bit chars as UTF-8 is
> equally doomed, unless it can figure out whether UTF-8 or iso-8859-1 was
> intended from context and can fall back to iso-8859-1.

The best option is to allow the user to override the default somehow --
too many programs and people using too many different things to do
otherwise. As for determining whether it is utf8 or 8859-1....

In the USEFOR mailing list, in answer to a question about how to tell
the difference, Clive Feather wrote:

> Only heuristically. There exist strings that are both well-formed
> ISO-8859-1 strings and well-formed UTF-8 strings (e.g. 0xC3 0xA2 is either
> A-tilde followed by cent sign, or it's UTF-8 for a-circumflex).
> But, basically:
> 
> * If all octets are 0x00 to 0x7F, it doesn't matter.
> 
> * ISO-8859-1 shouldn't contain octets 0x80 to 0x9F, so if you see those
>   it's probably UTF-8.
> 
> * UTF-8 should only contain octets with the top bit set in one of the
>   patterns:
>   - one octet 0xC2 to 0xDF, then one octet 0x80 to 0xBF
>   - one octet 0xE0 to 0xEF, then two octets 0x80 to 0xBF
>   - one octet 0xF0 to 0xF7, then three octets 0x80 to 0xBF
>   - one octet 0xF8 to 0xFB, then four octets 0x80 to 0xBF
>   - one octet 0xFC to 0xFD, then five octets 0x80 to 0xBF
>   so if you see any other case then it's probably ISO-8859-1.
> 
> A simple heuristic would be to count the number of times each of the latter
> two rules is broken, and choose the encoding that has less. If none are,
> you're in trouble.

This was used as the basis of a Perl script written by Bjoern Hoehrmann:

<http://groups.google.com/groups?q=msgid:%3c3a2eb7c0.36798303@news.bjoer
n.hoehrmann.de%3e&ic=1>

-- 
JBM
"Moebius strippers only show you their back side." -- Unknown
Technical Details
Message-ID: <1eqd7bo.l6xrht160iw6dN%planb@newsreaders.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.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!209.50.235.254!europa.netcrusader.net!152.163.239.131!portc03.blue.aol.com!uunet!dca.uu.net!ralph.vnet.net!planb
References: <9848qc$b0h$1@news2-2.kornet.net> <vxkitllbuqo.fsf@cinnamon.vanillaknot.com> <3AA659F2.557549C2@my-deja.com> <vxk1ys9b3gz.fsf@cinnamon.vanillaknot.com> <3AA6EB8D.E7DDAB4A@my-deja.com> <vxkelw8anda.fsf@cinnamon.vanillaknot.com> <1epy6s4.bnv3u01aykw89N%planb@newsreaders.com> <m6ss6.4488$25.2122869@newsrump.sjc.telocity.net>

Show Full Headers
Complete Article Headers
Message-ID: <1eqd7bo.l6xrht160iw6dN%planb@newsreaders.com>
Subject: 8 bit headers (was: Your Answer ??? Your comment???)
Date: Fri, 16 Mar 2001 14:42:03 -0500
From: planb@newsreaders.com (J.B. Moreno)
References: <9848qc$b0h$1@news2-2.kornet.net> <vxkitllbuqo.fsf@cinnamon.vanillaknot.com> <3AA659F2.557549C2@my-deja.com> <vxk1ys9b3gz.fsf@cinnamon.vanillaknot.com> <3AA6EB8D.E7DDAB4A@my-deja.com> <vxkelw8anda.fsf@cinnamon.vanillaknot.com> <1epy6s4.bnv3u01aykw89N%planb@newsreaders.com> <m6ss6.4488$25.2122869@newsrump.sjc.telocity.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.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!209.50.235.254!europa.netcrusader.net!152.163.239.131!portc03.blue.aol.com!uunet!dca.uu.net!ralph.vnet.net!planb
Newsgroups: news.software.readers
Organization: NetNews BOFH wannabe
X-Face: ]lUBtDImSD_`E"<*ZgyJUoCT\=CdRLFX4qCMLK[xy^L7v|uX|f8`cFDd*PaH8
  N*x>d^h
Mail-Copies-To: nobody
X-ACLA-Charter: <http://www.deja.com/msgid.xp?MID=%3Cphenix-121119981748546229@roxboro0-023.dyn.interpath.net%3E&ST=&AH=1>
User-Agent: MacSOUP/2.4.4
Lines: 59
NNTP-Posting-Host: 166.82.184.219
X-Trace: ralph.vnet.net 984771655 166.82.184.219 (Fri, 16 Mar 2001 14:40:55 EST)
NNTP-Posting-Date: Fri, 16 Mar 2001 14:40:55 EST