🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #86757

Re: Unicode in USENET article headers

#86757
From: Michael Baeuerle
Date: Thu, 07 May 2015 23:24
97 lines
6061 bytes
Joshua Cranmer 🐧 wrote:
> On 5/7/2015 8:26 AM, Michael Baeuerle wrote:
> > 
> > Current situation:
> > RFC5536 [1] define the whole header as US-ASCII encoded. If an article
> > header should contain something else, MIME (RFC2047 [2]) transfer
> > encoding is required to produce a standard compliant article.
> 
> Have you read and followed RFC 6530 and friends, as well as the list 
> traffic for the IETF eai and ima working groups? These give you roughly 
> the history of how the email people decided to sort out non-ASCII email.

I have read the RFCs, but not the lists.

> The foremost issue in email is allowing non-ASCII local parts, which 
> indirectly affects everyone who uses addr-spec. The solution of EAI was 
> to effectively create a message/global type that is UTF-8 
> (message/rfc822 remains 7-bit), and to sort of require that 
> message/global get transported by requiring extra actions on part of 
> clients in SMTP, POP, and IMAP. EAI decided against doing in-flight 
> downgrading, so it's entirely up to the client to decide when to use 
> message/global versus message/rfc822.

And that is what I think should not be copied for USENET (or there
will be decades to wait for adoption).

What I want to discuss in this thread:
Is there a possibility to change only the article format? In a way
that is compatible with mail (a subset of what is defined there) and
compatible with current USENET (at least to an acceptable degree) but
don't require a new or updated network for distribution.

> RFC 6530 ducks the issue of email normalization, continuing in the 
> tradition of "thou shalt not interpret a localpart unless you are the 
> destination MDA," the normalization of email addresses is undefined. 
> However, they do advise that clients may normalize to NFC/NFKC before 
> hand, so they suggest that servers not have email addresses that match 
> after normalization.

If groupnames stay US-ASCII, the distribution should work (even if the
"From:" and other fields containing 'addr-spec' tokens that agents may
not understand).

> If you translate EAI to NNTP, what you'd get is roughly the following:
> * A capability to advertise UTF-8 support on the part of the server.
> * A command that the client runs to indicate "I can read UTF-8"
> * The server downgrades messages to clients that don't run 
> aforementioned command

I don't think we'll see that into all servers within the next decade.

> * Don't make newsgroups that don't match after NFC. Actually, I'd just 
> go so far as to require that newsgroup names be in NFC.

Yes, or stay with ASCII for groupnames.

> > Problem:
> > MIME encoded words are ugly and complicate to handle. People want an
> > easier way to implement agents.
> 
> RFC 2047 is more often incorrectly implemented than correctly 
> implemented (particularly when it comes to splitting words [1]). 
> Unfortunately, it's also going to be needed to be supported for at 
> least 20 years, simply because clients aren't going to update 
> particularly quickly.

By far the most encoding errors and data corruption I see is in the
"Subject" field. So even don't touching the structured header fields at
all may make things work better.

> [...]
> [1] RFC 2047 mandates that you don't split in the middle of a multibyte 
> character. Doing this properly in a charset-agnostic way requires 
> carefully adding characters one at a time until you find the longest 
> length before wrapping... and if you're using a language like Java 
> where non-BMP characters are actually two characters, it's even more 
> annoying. It's actually why I included an emoji character in my display 
> name.

As I have implemented this into my MIME encoder, we had several
discussions in the german groups what RFC2047 means with "character" and
"self contained". Is it allowed to split at the boundary of an UTF-8
sequence, or is this a violation if the following UTF-8 sequence(es)
refer to codepoints with nonzero character combining class?
If multiple codepoints are composed to a single glyph, is every
codepoint a "character" or is the composed glyph a "character" in the
sense of the standard. There was no consensus.
I think an encoded word is not "self contained" if the first codepoint
try to combine with something outside the encoded word, because the
glyphs of an encoded word can't be rastered without context in this
case. Therefore I have implemented the stricter option (only split
before codepoints with zero character combining class).
-- 
Sorry, aber mit der Einstellung würden wir heute aus Sicherheitsgründen
noch auf dem Baum sitzen. Wer etwas Neues schaffen will, muß auch was
wagen - aber da heute Kinder schon zu Fuß mit Helm rumlaufen gilt das
wohl nicht mehr...                     [Eric Brücklmeier in dse]
Technical Details
Message-ID: <AABVS+d+RJMAAE+m.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.nntp.20150601.mbox.gz!border2.nntp.dca1.giganews.com!buffer2.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <AABVSz44XaQAABwE.A1.flnews@WStation3.stz-e.de> <mign6b$cf7$1@dont-email.me>

Show Full Headers
Complete Article Headers
Message-ID: <AABVS+d+RJMAAE+m.A1.flnews@WStation4.micha.freeshell.org>
Subject: Re: Unicode in USENET article headers
Date: Thu, 07 May 2015 23:24:15 +0000
From: Michael Baeuerle <michael.baeuerle@gmx.net>
References: <AABVSz44XaQAABwE.A1.flnews@WStation3.stz-e.de> <mign6b$cf7$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border2.nntp.dca1.giganews.com!buffer2.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.nntp
Lines: 97
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net GL6fhYxNjALmoj3Cdx0qUw/AdrJjIqdiLs4mILrReCT/tlPstW
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:sA7xSYuXbWabdiztjE3yeAK/Ppk=
 sha1:w/xSYDA7nFDPNoOdJsUe5eYdLTQ=
Injection-Date: 7 May 2015 23:24:15 -0000
User-Agent: flnews/0.11pre16 (for AIX)
X-Original-Bytes: 5805