🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #260742

Re: [Dialog] Unicode capabilities

#260742
From: Adam H. Kerman
Date: Sat, 16 Jul 2016 15:29
55 lines
3711 bytes
Michael <michael.baeuerle@gmx.net> wrote:
>Adam H. Kerman wrote:
>>Michael <michael.baeuerle@gmx.net> wrote:

>>>[...]
>>>Examples for similar problems in the body with old trn:
>>><news:nkgg9q$s6f$1@news.albasani.net>
>>>(reply to ISO 8859-1 encoded article body)
>>><news:nkeruf$p5k$1@news.albasani.net>
>>>(reply to UTF-8 encoded article body)
>>>The (correctly declared) Unicode data was not converted but crippled.
>>>You have already written that this is not the fault of trn itself, but
>>>the result is clearly broken.

>>He undoubtably modified the posting script to add the same MIME headers
>>to his own articles, regardless of the character set used in the quoted
>>text. If I deliberately quote a non-ASCII character, I'd just write the
>>necessary MIME header to declare the correct character set.

>Simply declaring something without former checking the encoding of
>the quoted article is not a good idea.

That's what my eyes are for.

>>There are people who have written parsers in order to make reasonable
>>assumptions about character sets.

>For the examples above no assumptions are required. All quoted articles
>had valid charset declarations.

I don't assume anything in the case of a quoted quote.

>>trn4 could obviously send output of
>>the proto-article to a parser to allow the user to make a reasonable
>>choice about what character set to declare, or possibly translate into
>>the lowest denominator character set or even eradicate non-ASCII characters
>>that have adequate substitutes in ASCII and to obliterate the
>>non plain text characters like no-break space.

>For the examples above an automatic solution for the body could be:
>Let a parser script extract the charset parameter from the "Content-
>Type" header field of the quoted article. Then use the extracted value
>for iconv to convert the quoted data to ISO 8859-1 (the label that is
>later applied to the result).

>If iconv fails, because the data cannot be represented as ISO 8859-1,
>it can still be edited by hand (e.g. replacing Unicode double quotes
>with chevrons or ASCII double quotes).

A sanity check is required first before attempting conversion. Was the
MIME header standard to begin with? I'd never make that assumption.

Also, you just have to start by assuming that the character set declared
in the MIME header applies to the new portions of the body and not
the quoted portions.
Technical Details
Message-ID: <nmdjs4$lhp$2@news.albasani.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.(126883).mbox.7z!not-for-mail
References: <nli1e8$hi6$1@news.mixmin.net> <AABXiLQ0F8AAAAvc.A1.flnews@WStation5.stz-e.de> <nmavah$p4a$1@news.albasani.net> <AABXigTa+nYAAFHc.A1.flnews@WStation4.micha.freeshell.org>

Show Full Headers
Complete Article Headers
Message-ID: <nmdjs4$lhp$2@news.albasani.net>
Subject: Re: [Dialog] Unicode capabilities
Date: Sat, 16 Jul 2016 15:29:08 +0000
From: "Adam H. Kerman" <ahk@chinet.com>
References: <nli1e8$hi6$1@news.mixmin.net> <AABXiLQ0F8AAAAvc.A1.flnews@WStation5.stz-e.de> <nmavah$p4a$1@news.albasani.net> <AABXigTa+nYAAFHc.A1.flnews@WStation4.micha.freeshell.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.(126883).mbox.7z!not-for-mail
Newsgroups: news.software.readers
Organization: albasani.net
Lines: 55
X-Trace: news.albasani.net t0u6g27lXGuCLxv9tT+/MfyA1aGq1KtQ/SxYPt/vaUZhyHtoCUvIm4kRxqncUgTxcgWs6ULzk625oFUHRNALpZILJZxVCkC3WqSB5xobsd4oN74HXCZ+hV2edEpyxTni
NNTP-Posting-Date: Sat, 16 Jul 2016 15:29:08 +0000 (UTC)
Injection-Info: news.albasani.net; logging-data="ywa4ig81SSWTafywQ6LEr3h07sUhz9u2sRY86EZzyWNzKD9eM0vWZmn7r3V4rTEmKy3FcF0bHKpAwm6zPx6kno66N346HECTIKqsaQ3C1WE1mwgrCDpM/nozOC8SFvMV"; mail-complaints-to="abuse@albasani.net"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Cancel-Lock: sha1:pcnu5kJTgejvPZ7RCUOazvRhlNw=
X-Received-Bytes: 3566
X-Received-Body-CRC: 2022816397