🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #261754

Re: Ping Bernd Rose: How do you set and define a variable in 40Tude Dialog

#261754
From: Michael Bäuerle
Date: Tue, 10 Jan 2017 11:01
72 lines
4748 bytes
tlvp wrote:
> On Tue, 10 Jan 2017 09:50:09 +0100, Michael Bäuerle wrote, in part:
> > 
> > Dialog has a bug in the UTF-8 encoder for all codepoints beyond U+FFFF.
> > 
> > Example: ? (U+1F600 GRINNING FACE)
             ^
Dialog tried to use a surrogate pair for UTF-8 (they are allowed only
for UTF-16) and encoded two 3-byte sequences for two surrogate code-
points:

   0xED 0xA0 0xBD    0xED 0xB8 0x80

This in not valid UTF-8! The correct encoding for U+1F600 in UTF-8 is
the single 4-byte sequence:

   0xF0 0x9F 0x98 0x80

> > Dialog should cripple such characters with UTF-8 (by encoding them with
> > reserved surrogate codepoints), but works correctly with UTF-7.

.... because this is Base64 encoded UTF-16 (and therefore internally use
surrogate pairs).

> Thanks very much for pointing that out: I never knew that before.
> 
> You yourself were using charset=UTF-8 for that posting. And I had imagined
> for some years now that I too was using that, though I see now, checking
> headers of recent messages elsewhere that I've sent, I seem to have
> reverted to 7-bit US-ASCII (!) :-{ . 
>
> Yet if I consult my settings under 
>
> Dialog > Message > Charsets > Default Group Charset
>
> I see UTF-8 highlighted; and the other three Charset types (Body, Subject,
> and From) are all shown as Default. Am I doing something wrong?

Normally UTF-8 should be used for Unicode in USENET articles. But
because of the bug in Dialog (see above), only UTF-7 work for all
codepoints without manual user intervention.

> Anway, under Settings > General Settings... > Charsets > ...for postings
> 
> I see "Use best matching charset out of: utf-8 (highlighted), utf-7,
> us-ascii, iso-8859-2, iso-8859-1, ..."
> 
> So maybe Dialog uses US-ASCII when nothing more serious is needed,

In general it is a good idea. This is also officially recommended by
MIME [1]:
| 
| In general, composition software should always use the "lowest common
| denominator" character set possible.  For example, if a body contains
| only US-ASCII characters, it SHOULD be marked as being in the US-
| ASCII character set, not ISO-8859-1, which, like all the ISO-8859
| family of character sets, is a superset of US-ASCII.  More generally,
| if a widely-used character set is a subset of another character set,
| and a body contains only characters in the widely-used subset, it
| should be labelled as being in that subset.  This will increase the
| chances that the recipient will be able to view the resulting entity
| correctly.

> but does
> use UTF-8 (or maybe UTF-7) when I use such European diacritically modified
> characters as à, á, ä, ą, ç, ć, è, é, ê, ę, ŀ, ń, ñ, ó, ś, ź, ż, usw.

They are all OK, because none use a codepoint beyond U+FFFF.


__________________
[1] <https://tools.ietf.org/html/rfc2046#section-4.1.2>
Technical Details
Message-ID: <AABYdL8TA1oAAAGq.A1.flnews@WStation5.stz-e.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.(126883).mbox.7z!not-for-mail
References: <o4bg7v$t51$1@gioia.aioe.org> <1xmerwn6hkw2o.dlg@b.rose.tmpbox.news.arcor.de> <o4cbjs$4pc$1@gioia.aioe.org> <w4daz9t9jqbr$.dlg@b.rose.tmpbox.news.arcor.de> <o4mq1e$2u7$1@gioia.aioe.org> <1k5qgdg6ulbzp$.dlg@b.rose.tmpbox.news.arcor.de> <o4pna9$9u9$1@gioia.aioe.org> <11rcu0h87cvsa.dlg@b.rose.tmpbox.news.arcor.de> <o4rlog$1j7o$1@gioia.aioe.org> <1ffs4h0aol2bg.dlg@b.rose.tmpbox.news.arcor.de> <o4s2ec$a4u$1@gioia.aioe.org> <ybae5rblj1id.dlg@b.rose.tmpbox.news.arcor.de> <o4uqtu$1ddk$1@gioia.aioe.org> <lu7ckd-gf3.ln1@leafnode.dandasparks.org.uk> <o50ek4$1q69$1@gioia.aioe.org> <o50gkq$1u8p$1@gioia.aioe.org> <5k4dkd-gf3.ln1@leafnode.dandasparks.org.uk> <o518hb$16at$1@gioia.aioe.org> <AABYdKBBCtsAAAVt.A1.flnews@WStation5.stz-e.de> <1s2z64euu47tz$.efmkc660euqn$.dlg@40tude.net>

Show Full Headers
Complete Article Headers
Message-ID: <AABYdL8TA1oAAAGq.A1.flnews@WStation5.stz-e.de>
Subject: Re: Ping Bernd Rose: How do you set and define a variable in 40Tude Dialog
Date: Tue, 10 Jan 2017 12:01:39 +0100
From: Michael Bäuerle <michael.baeuerle@stz-e.de>
References: <o4bg7v$t51$1@gioia.aioe.org> <1xmerwn6hkw2o.dlg@b.rose.tmpbox.news.arcor.de> <o4cbjs$4pc$1@gioia.aioe.org> <w4daz9t9jqbr$.dlg@b.rose.tmpbox.news.arcor.de> <o4mq1e$2u7$1@gioia.aioe.org> <1k5qgdg6ulbzp$.dlg@b.rose.tmpbox.news.arcor.de> <o4pna9$9u9$1@gioia.aioe.org> <11rcu0h87cvsa.dlg@b.rose.tmpbox.news.arcor.de> <o4rlog$1j7o$1@gioia.aioe.org> <1ffs4h0aol2bg.dlg@b.rose.tmpbox.news.arcor.de> <o4s2ec$a4u$1@gioia.aioe.org> <ybae5rblj1id.dlg@b.rose.tmpbox.news.arcor.de> <o4uqtu$1ddk$1@gioia.aioe.org> <lu7ckd-gf3.ln1@leafnode.dandasparks.org.uk> <o50ek4$1q69$1@gioia.aioe.org> <o50gkq$1u8p$1@gioia.aioe.org> <5k4dkd-gf3.ln1@leafnode.dandasparks.org.uk> <o518hb$16at$1@gioia.aioe.org> <AABYdKBBCtsAAAVt.A1.flnews@WStation5.stz-e.de> <1s2z64euu47tz$.efmkc660euqn$.dlg@40tude.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: 72
Reply-To: Michael Bäuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net fXFsg66oMW8wqyZNOwgfuAXlJGaCpljlNP+qwpK7icR4WiK5n1
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:ySxUZu+ichUOUXYSUICrS+7z7Vs= sha1:jWz+GzuLR6lcIX9s7mQkKmZypI0=
Injection-Date: Tue, 10 Jan 2017 11:01:39 -0000
User-Agent: flnews/0.14 (for NetBSD)
X-Received-Body-CRC: 3639188523
X-Received-Bytes: 4635