Article View: news.software.readers
Article #260739Re: [Dialog] Unicode capabilities
From: Michael Bäuerle
Date: Sat, 16 Jul 2016 09:56
Date: Sat, 16 Jul 2016 09:56
43 lines
3049 bytes
3049 bytes
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. >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. >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).
Technical Details
Message-ID:
<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-mailReferences:
<nli1e8$hi6$1@news.mixmin.net> <AABXh6fpK8MAABXd.A1.flnews@WStation5.stz-e.de> <nm8jia$e0s$1@news.albasani.net> <AABXiLQ0F8AAAAvc.A1.flnews@WStation5.stz-e.de> <nmavah$p4a$1@news.albasani.net>Show Full Headers
Complete Article Headers
Message-ID: <AABXigTa+nYAAFHc.A1.flnews@WStation4.micha.freeshell.org> Subject: Re: [Dialog] Unicode capabilities Date: Sat, 16 Jul 2016 09:56:42 -0000 From: Michael Bäuerle <michael.baeuerle@gmx.net> References: <nli1e8$hi6$1@news.mixmin.net> <AABXh6fpK8MAABXd.A1.flnews@WStation5.stz-e.de> <nm8jia$e0s$1@news.albasani.net> <AABXiLQ0F8AAAAvc.A1.flnews@WStation5.stz-e.de> <nmavah$p4a$1@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 Newsgroups: news.software.readers Lines: 43 Mime-Version: 1.0 X-Trace: individual.net 2vjTswovLklhI5T5UWqjiwMe2feA9gBaQR6unhrsPPvfecbA1m X-Orig-Path: not-for-mail Cancel-Lock: sha1:K8a3qeRtZrZSIOI+1CcR7bMihNU= sha1:ARhNNYkh5oAxEAokTStcnbuH8SU= Injection-Date: Sat, 16 Jul 2016 09:56:42 -0000 User-Agent: flnews/0.14pre44 (for AIX) X-Received-Body-CRC: 2468744606 X-Received-Bytes: 2904