Article View: news.software.readers
Article #240864Re: Message encodings
From: Wolfgang Schelongowski
Date: Sun, 16 May 2010 11:22
Date: Sun, 16 May 2010 11:22
61 lines
3301 bytes
3301 bytes
Ralph Fox <-rf-nz-@-.invalid> writes: >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. OK so far. >Examples: > > For English-language newsgroups -- charset = windows-1252 charset=us-ascii will do, usually. > (Also for most other Western European languages). IMO iso8859-15 would be a better choice, for all languages west of Ye Olde Iron Curtain (de, dk, se, ... included). > For Polish-language newsgroups -- charset = iso-8859-2 > (Also for most other Central European languages using Latin script). No, only for those Central/Eastern/Southern languages of slavic origin which do _not_ use Cyrillic (pl, cz, hr, ...). > 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) Then there's greece, turkey, ... chinese. An `interesting' can of worms. David should first have a look at some free source newsreaders to avoid "re-inventing the wheel". Mozilla/Thunderbird/KNode/Gnus/tin immediately spring to mind, after having a look at de.admin.lists :-) [Agreed with the rest of your article.] -- The first entry of Sin into the mind occurs when, out of cowardice or conformity or vanity, the Real is replaced by a comforting lie. -- Integritas, Consonantia, Claritas
Technical Details
Message-ID:
<hsokgp$3ps$1@ID-102910.user.uni-berlin.de>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!newsfeed.straub-nv.de!news.albasani.net!lilly.ping.de!xivic.prima.de!not-for-mailReferences:
<69i2c7-7o4.ln1@gate.cowlark.com> <62luu598ir9e14o7k5pp8cj59vi59n80se@4ax.com>Show Full Headers
Complete Article Headers
Message-ID: <hsokgp$3ps$1@ID-102910.user.uni-berlin.de> Subject: Re: Message encodings Date: Sun, 16 May 2010 11:22:01 +0000 From: Wolfgang.Schelongowski@gmx.de (Wolfgang Schelongowski) References: <69i2c7-7o4.ln1@gate.cowlark.com> <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.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!news.albasani.net!lilly.ping.de!xivic.prima.de!not-for-mail Newsgroups: news.software.readers Organization: Private site in Germany Lines: 61 Reply-To: nospam+949ra7$h6e$1$94fljh$i3t$1$949ra7$h6e$1$94fljh$i3t$1@xivic.prima.de (Wolfgang Schelongowski) X-Accept-Language: de, de-DE, en